How to remove the first n characters from an NSString

There’s a convenient method for that by the name of substringFromIndex. This example removes the first character:

substringFromString takes only one parameter which specifies where to start the new string. The first character is 0 based, like in arrays. The parameter can’t be longer than the original string’s length for obvious reasons.

About Jay Versluis

Jay is a medical miracle known as a Super Survivor. He runs two YouTube channels, five websites and several podcast feeds. To see what else he's up to, and to support him on his mission to make the world a better place, check out his Patreon Campaign.

Add your voice!