-1
我需要在字符串末尾截斷一個逗號,有點像這樣:字符串截斷,特別是末尾的逗號。
NSString *string = @" this text has spaces before and after ";
NSString *trimmedString = [string stringByTrimmingCharactersInSet:
[NSCharacterSet whitespaceCharacterSet]];
代替whitespaceCharacterSet是有什麼樣commaCharacterSet?
!THX! – stackOverFlew