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 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…