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
Post a Comment