How can I remove leading zeros from an NSString
?
e.g. I have:
NSString *myString;
with values such as @"0002060"
, @"00236"
and @"21456"
.
I want to remove any leading zeros if they occur:
e.g. Convert the previous to @"2060"
, @"236"
and @"21456"
.
Thanks.
See Question&Answers more detail:os