My little heaven
Inspire your soul
Wednesday, July 10, 2013
iOS - set certain format to numbers
If you have a number, like 123, but you want to display like 000123, you can do this like
NSString
*transID =[
NSString
stringWithFormat
:
@"%06d"
,123
];
Then it will fill up the empty space with 0
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment