Hoping somebody can help me out - I would like to replace a certain character in a string and am wondering what is the best way to do this?
I know the location of the character, so for example, if I want to change the 3rd character in a string from A to B - how would I code that?
Here is the code:
If it is always the same character you can use:
If it is the same string in the same location you can use:
If is just a specific location you can use:
Documentation here: https://developer.apple.com/documentation/foundation/nsstring
So for example:
newText would equal "Boat"
Use the
replaceCharactersInRange: withString:
message on aNSMutableString
object.