#import <Foundation/Foundation.h>
int main(int argc, const char * argv[])
{
NSString *string = @" ffdsfmcbhvewifdcan ";
string = [string stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]];
unsigned long len = string.length;
NSString *string1 = [string substringToIndex:len-1];
NSMutableString *str = [NSMutableString new];
[str appendString:[NSString stringWithFormat:@"%@",string1]];
[str appendFormat:@"*"];
NSLog(@"-%@-",str);
return 0;
}
|