Dear fellow users,
is there a way to take a string in variable and add "0" as padding with maximum number of "0"?
for example
wind_speed value is 1.6 i need to add padding (max 5 char for wind_speed) so it will result in 001.6
i think i can use sprintf, but i'm confused by the example on the crbasic editor help menu
please help
Try this format string.
"%05.01f"
That has both leading zeroes and a trailing 0 if needed.
Thanks JDavis, i managed to modify it and it works like a charm now