|
#1
|
|||
|
|||
|
Missing a formatted printf for leading zeros
Hi,
I'm Using SUF 8.1.1006.0 I want to convert a number to a string specifying the with of the string and heaving leading zeros or spaces. e.g. 1 => "001" or " 1". I'm looking for a function, like the C printf("%03d", number) or printf("% 3d", number). A String.Format() or NumberToString would be a nice feature. If there is already a function to easy convert, please give me a hint and I appologize for inconvenience. Udo |
|
#2
|
||||
|
||||
|
Quote:
there are native Lua functions able to to this. For example: Code:
mystring = string.format("%03d", number);
hexa = string.format("%02X", number);
|
|
#3
|
|||
|
|||
|
Thanks a lot Ulrich.
Tried it, works fine. ![]() A hint within string online help would be appreciated to solve my problem. |
![]() |
«
Previous Thread
|
Next Thread
»
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Is there formatted string (i.e., printf) capability? | Ken Gartner | TrueUpdate 2.0 | 1 | 03-16-2005 10:18 AM |
| CR 8.5 Runtime Modules causing Build errors | BurnMan2003 | Setup Factory 6.0 | 7 | 10-10-2003 09:59 AM |
All times are GMT -6. The time now is 08:23 AM.










Linear Mode

