I am working on a Xcode
program and need to cut the last 5 characters from a string.
Does anybody know how to cut the last 5 characters from a NSString
?
just looked for it my self few minutes ago
NSString *str = @"1234567890";
NSString *newStr;
newStr = [str substringToIndex:[str length]-5];
NSLog(@"%@", newStr);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With