#import
int main(int argc, const char * argv[])
{
@autoreleasepool {
// insert code here...
NSString *str=@"world";
NSString *t=@"hello,";
NSString *test=[t stringByAppendingString:str];
NSMutableString *newstring=[NSMutableString string];
NSString *word = @"ld";
BOOL a=[test hasSuffix:word];
if(a)
{
NSLog(@"有后缀");
}
else
{
NSLog(@"没有后缀");
}
[newstring appendString:test];
NSLog(@"%@",newstring);
}
return 0;
}