赞
踩
-(NSString *)sortAndCompress:(NSString *)string{
//const char *p = [string UTF8String];
//首先把不可变字符串转化为可变字符串,因为可变字符串有替换操作
NSMutableString *muString = [NSMutableString stringWithString:string];
//进行排序,冒泡,升序
//NSLog(@"%lu",string.length);
for (int i = 0; i < muString.length - 1; i++) {
for (int j = 0 ; j < muString.length - i - 1;
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。