STRING strfmt(STRING format, ANY arg, ...)
This function formats its arguments and returns the result. How the arguments are formatted depends upon the argument format. The format contains two types of sequences: plain characters, which are simply copied to the new string, and format specifications, each of which causes printing of the next successive argument. The format begins with a percent character (%), followed by:
If the Format Type is anything but d or D, the data will be converted as if it were "added" to a string using the arithmetic operator. If an uppercase character is used in the Format Type, any argument which has a length longer than the Pad Length will be truncated accordingly. Otherwise the argument will not be truncated. If an elipse is used, the argument will always be truncated three characters shorter than the Pad Length, with "..." being placed at the end.
Examples:
strfmt("%r", "test")
=> "test"
strfmt("%l", "test")
=> "test"
strfmt("%c", "test")
=> "test"
strfmt("%d", "test")
=> ""test""
strfmt("%10r", "test")
=> " test"
strfmt("%10l", "test")
=> "test "
strfmt("%10c", "test")
=> " test "
strfmt("%10{|>}r", "test")
=> "|>|>|>test"
strfmt("%10{|>}l", "test")
=> "test|>|>|>"
strfmt("%10{|>}c", "test")
=> "|>|test|>|"
strfmt("%.2l", 1.1214)
=> "1.12"
strfmt("%10.3{0}r", 1.1214)
=> "000001.121"
strfmt("%10.3{0}r", 1.1214)
=> "1.12100000"
strfmt("%5e", "testing")
=> "te..."
strfmt("%s parents: %25e", "$user", [$body, $interaction, $mail_ui]);
=> "$user parents: [$body, $interaction, ..."
crypt() | explode() | lowercase() | match_begin() | match_pattern() | match_regexp() | match_template() | pad() | regexp() | strcmp() | strfmt() | strgraft() | strlen() | strsed() | strsub() | substr() | uppercase() | match_crypted() | split() | stridx()