Tasmota/lib/libesp32/berry/examples/strmod.be

8 lines
255 B
Plaintext

import string
print(string.format('%.3d', 12))
print(string.format('%.3f', 12))
print(string.format('%20.7f', 14.5))
print(string.format('-- %-40s ---', 'this is a string format test'))
print(string.format('-- %40s ---', 'this is a string format test'))