首页 > 代码库 > nsstring遍历汉子

nsstring遍历汉子

NSString *mytimestr=@"好人一生平安";    size_t length = [mytimestr length];    for (size_t i=0; i < length; i++) {        unichar c = [mytimestr characterAtIndex:i];        NSLog(@"%C", c);    }

 

nsstring遍历汉子