skip to Main Content

How to Delete the last character in a NSString in iOS

Trying to remove the last character of an NSString? Got in trouble and pulling you hair? Newbie in Objective-C and no idea how to make this work?

Ok, enough with the questions, here’s the snippet to achieve that:


Or if you need it inĀ Swift: