NSString - 如何将伦敦转换为伦敦

时间:2011-10-08 18:41:51

标签: iphone ios nsstring

如何将字符串@“NEW YORK”转换为@“New York”,或将“LONDON”转换为“London”?

谢谢,

RL

1 个答案:

答案 0 :(得分:3)

NSString *allCapsString = @"LONDON";
NSString *city = [allCapsString capitalizedString];
NSLog(@"%@", city); // @"London"