01, 02, 03, 04, 05..
001, 002, 003, 004, 005..
0001, 0002, 0003, 0004, 0005..
You get the pattern? Good!
int num = 1; [NSString stringWithFormat:@"%02d", num];
001, 002, 003, 004, 005..
[NSString stringWithFormat:@"%03d", num];
0001, 0002, 0003, 0004, 0005..
[NSString stringWithFormat:@"%04d", num];
You get the pattern? Good!
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNmP7aYKgp9xTfMC_7A3R7skVVuYPycLaLNxMNgk8RUaG2O_iY3WOfOH2-Jfv5lBumjRuxMFDTREGY92aP8NvNJwDSbNd5MD6N6haqs_bkXnPzCCpctv_Cf3fPqGJTtBLEV6BZ0PAkJ2M/s1600/0001.png)
No comments:
Post a Comment