-1
我需要在字符串末尾截断一个逗号,有点像这样:字符串截断,特别是末尾的逗号。
NSString *string = @" this text has spaces before and after ";
NSString *trimmedString = [string stringByTrimmingCharactersInSet:
[NSCharacterSet whitespaceCharacterSet]];
代替whitespaceCharacterSet是有什么样commaCharacterSet?
!THX! – stackOverFlew