I am having an issue where I try to create a string but one of the letters in that string (m) is being dropped. I don’t understand what is going on, how do you fix it?
This is the code:
typeTo.text = [typeTo.text stringByReplacingOccurrencesOfString:@"random" withString:@"(random (1,10000000)/10000000)"];
NSLog(@"%@", typeTo.text);
NSLog prints:
rando
Thanks
Please check the input string… I just tested this:
And it printed:
It’s working fine, replacing all occurrences of random with (random (1,10000000)/10000000).