string_format(val,tot,dec)

From ENIGMA

Jump to: navigation, search

Description

Converts the given value to a string using custom formatting. You can specify the number of decimals and places the formatting will use.

Parameters

Parameter Data Type Description
val double the value to format
tot unsigned number of places accepted, if the number has less places, then zeroes or spaces will be inserted instead
dec unsigned number of decimals accepted

Return Values

string: Returns the value with the given formatting.

Example Call

// demonstrates formatting a string
var str;
str = string_format(1234, 6, 0); // result is "  1234"
str = string_format(pi, 1, 5); // result is "3.14159"
str = string_format(pi, 3, 5); // result is "  3.14159"
Personal tools
Namespaces
Variants
Actions
Navigation
ENIGMA
Other
Toolbox