docs: add formatting example for `"[${10.0000:.2f}]"`
parent
5815ab8d00
commit
f2e0ab5912
|
@ -624,6 +624,9 @@ println('[${int(x):010}]') // pad with zeros on the left => [0000000123]
|
|||
println('[${int(x):b}]') // output as binary => [1111011]
|
||||
println('[${int(x):o}]') // output as octal => [173]
|
||||
println('[${int(x):X}]') // output as uppercase hex => [7B]
|
||||
|
||||
println('[${10.0000:.2}]') // remove insignificant 0s at the end => [10]
|
||||
println('[${10.0000:.2f}]') // do show the 0s at the end, even though they do not change the number => [10.00]
|
||||
```
|
||||
|
||||
### String operators
|
||||
|
|
Loading…
Reference in New Issue