diff --git a/reference/strings/functions/sprintf.xml b/reference/strings/functions/sprintf.xml index 31659b69ca..00f9a644ea 100644 --- a/reference/strings/functions/sprintf.xml +++ b/reference/strings/functions/sprintf.xml @@ -117,10 +117,6 @@ E - like %e but uses uppercase letter (e.g. 1.2E+2). - - u - the argument is treated as an - integer, and presented as an unsigned decimal number. - f - the argument is treated as a float, and presented as a floating-point number (locale aware). @@ -146,6 +142,10 @@ s - the argument is treated as and presented as a string. + + u - the argument is treated as an + integer, and presented as an unsigned decimal number. + x - the argument is treated as an integer and presented as a hexadecimal number (with lowercase @@ -161,6 +161,49 @@ + + Variables will be co-erced to a suitable type for the specifier: + + Type Handling + + + + Type + Specifiers + + + + + string + s + + + long + + d, + u, + c, + o, + x, + X, + b + + + + double + + g, + G, + e, + E, + f, + F + + + + +
+
The format string supports argument numbering/swapping. Here is an example: