objective c - NSString get -characters -


i want characters of nsstring. this:

nsstring *data; const char * typein = [[data characters] utf8string]; 

but nsstring won't respond -characters. how characters of nsstring?

thanks, elijah

you can use function:

for(int =0 ;i<[mystring length]; i++) {   char character = [mystring characteratindex:i]; } 

or

nsstring *str = @"astring"; const char *cstring = [str utf8string]; 

Comments

Popular posts from this blog

ASP.NET/SQL find the element ID and update database -

jquery - appear modal windows bottom -

c++ - Compiling static TagLib 1.6.3 libraries for Windows -