2011-12-07 49 views
1

有沒有辦法將NSString拆分爲數組,其中所有字母都是分隔的?將字符串中的字母轉換爲數組

是這樣的:

NSString *str = @"hey dude";

//Array output : h,e,y,d,u,d,e

+2

check [this](http://stackoverflow.com/questions/3581532/convert-nsstring-into-char-array)out – PTBG

+0

謝謝! 。 。 。 。 :) – ebsp

回答

0

[stringToCopy getCString:c_buffer最大長度:c_buffer_length編碼:NSUTF8StringEncoding];

+0

這會返回'h,e,y,,d,u,d,e'嗎?注意空白處。 –

相關問題