NSString *character = nil;
for (int i=0; i<muStr.length; i++) {
character = [muStr substringWithRange:NSMakeRange(i, 1)];
if ([character isEqualToString:@"\n"]){
[muStr deleteCharactersInRange:NSMakeRange(i, 1)];
}
}
NSString *character1 = nil;
for (int i=0; i<muStr.length; i++) {
character1 = [muStr substringWithRange:NSMakeRange(i, 1)];
if ([character isEqualToString:@"\r"]){
[muStr deleteCharactersInRange:NSMakeRange(i, 1)];
}
}
+ (NSString *)delSpaceAndNewline:(NSString *)string;{
NSMutableString *mutStr = [NSMutableString stringWithString:string];
NSRange range = {0,mutStr.length};
[mutStr replaceOccurrencesOfString:@" " withString:@"" options:NSLiteralSearch range:range];
NSRange range2 = {0,mutStr.length};
[mutStr replaceOccurrencesOfString:@"\n" withString:@"" options:NSLiteralSearch range:range2];
return mutStr;
}