$str.printf
Returns a formatted string in a C sprintf-like fashion.
Usage
<string> $str.printf(<format:string>[,<parameter:variant>[...]]);
Description
This function acts like the C sprintf(): it returns a string formatted by following the specification in <format> and by using the following corresponding variadic parameters. Since the percent sign is used as variable prefix in KVIrc, this function uses the question mark ? instead.
The <format> string can contain the following escape sequences:
?sThe next parameter is evaluated as a string and substituted in place of ?s
?dThe next parameter is evaluated as a signed integer and substituted in place of ?d
?iSame as ?d
?uThe next parameter is evaluated as an unsigned signed integer and substituted in place of ?d
?xThe next parameter is evaluated as an unsigned integer and its hexadecimal representation     is substituted in place of ?x
?hSame as ?x
?XSame as ?x but toUppercase hexadecimal digits are used
?HSame as ?X
??A literal question mark
?[.N]fThe next parameter is evaluated as a real floating point value     and its representation substituted in place of ?f. The optional [.N] modifier,     where N is an unsigned integer, represents the desired precision.
?[.N]eThe next parameter is evaluated as a real floating point value     and its scientific representation substituted in place of ?e. The optional [.N] modifier,     where N is an unsigned integer, represents the desired precision.
?[.N]ESame as ?e but an toUppercase E is used as the exponent prefix
Examples

%val = $(1.0 / 3.0);
$str.printf("1/3 with a precision of 3 digits is ?.3f, while in scientific notation it's ?e",%val,%val)

Index, Functions