I want to generate receipt serial numbers like this format "00000001". Each time a new transaction occurs, the receipt number should increase by 1.
0000001 0000002 0000003 0000010 0000011 0000100 0000101
So how could I implement this type of number format. Are there special number formats in the C object?
If your numbers are integers, and only the output, you can do:
NSString * output = [NSString stringWithFormat:@"%07d", integer];
so that the number is formatted with 7 digits leading zeros.
How to simply answer a question
NSString *str=[NSString stringWithFormat:@"%08d", intvalue];
change the value 8 to any number of zeros you need
Source: https://habr.com/ru/post/1391189/More articles:https://translate.googleusercontent.com/translate_c?depth=1&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1391184/bazaar-how-to-show-history-of-changes-to-a-file&usg=ALkJrhjBEk7jxtyn4WKBUvnqpTn32_1eTQto use Skype4COM.dll COM API in visual studio - c #Is there a built-in sort function in Objective-C? - sortingcheck date database and execute - javasearching words with [a-zA-Z] from a sentence using Regex - javaLookAt Matrix model - C ++, OpenGL - c ++https://translate.googleusercontent.com/translate_c?depth=1&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1391191/export-images-to-pdf&usg=ALkJrhhW0PqtPVCafuQS7ULfOm5Kp1RqmACompiling vlc-android source code - libvlcHow to request a fee using Linq.Expressions - linqTags vs functions in twig extensions - phpAll Articles