From cbc1550a428ea349e2d4c77d61d63eb71b4615d3 Mon Sep 17 00:00:00 2001 From: Torben Wilson Date: Mon, 11 Sep 2000 19:15:11 +0000 Subject: [PATCH] Specify that conversion specifiers in sprintf() & friends start with '%'. Fixed a typo. git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@32505 c90b9560-bf6c-de11-be94-00142212c4b1 --- functions/strings.xml | 131 +++++++++++++++++++++--------------------- 1 file changed, 66 insertions(+), 65 deletions(-) diff --git a/functions/strings.xml b/functions/strings.xml index bfe590187f..e66a0c8eba 100644 --- a/functions/strings.xml +++ b/functions/strings.xml @@ -1468,7 +1468,7 @@ soundex ("Lukasiewicz") == soundex ("Lissajous") == 'L222'; format. - The format string is composed by zero or more directives: + The format string is composed of zero or more directives: ordinary characters (excluding %) that are copied directly to the result, and conversion specifications, each of which results in fetching its @@ -1476,89 +1476,90 @@ soundex ("Lukasiewicz") == soundex ("Lissajous") == 'L222'; and printf. - Each conversion specification consists of these elements, in - order: + Each conversion specification consists of a percent sign + (%), followed by one or more of these + elements, in order: - An optional padding specifier that says - what character will be used for padding the results to the - right string size. This may be a space character or a - 0 (zero character). The default is to pad - with spaces. An alternate padding character can be specified - by prefixing it with a single quote ('). - See the examples below. + An optional padding specifier that says + what character will be used for padding the results to the + right string size. This may be a space character or a + 0 (zero character). The default is to pad + with spaces. An alternate padding character can be specified + by prefixing it with a single quote ('). + See the examples below. - An optional alignment specifier that says - if the result should be left-justified or right-justified. - The default is right-justified; a - - character here will make it left-justified. + An optional alignment specifier that says + if the result should be left-justified or right-justified. + The default is right-justified; a - + character here will make it left-justified. - An optional number, a width specifier - that says how many characters (minimum) this conversion should - result in. + An optional number, a width specifier + that says how many characters (minimum) this conversion should + result in. - An optional precision specifier that says - how many decimal digits should be displayed for floating-point - numbers. This option has no effect for other types than - double. (Another function useful for formatting numbers is - number_format.) + An optional precision specifier that says + how many decimal digits should be displayed for floating-point + numbers. This option has no effect for other types than + double. (Another function useful for formatting numbers is + number_format.) - A type specifier that says what type the - argument data should be treated as. Possible types: - - - % - a literal percent character. No - argument is required. - - - b - the argument is treated as an - integer, and presented as a binary number. - - - c - the argument is treated as an - integer, and presented as the character with that ASCII - value. - - - d - the argument is treated as an - integer, and presented as a decimal number. - - - f - the argument is treated as a double, - and presented as a floating-point number. - - - o - the argument is treated as an - integer, and presented as an octal number. - - - s - the argument is treated as and - presented as a string. - - - x - the argument is treated as an integer - and presented as a hexadecimal number (with lowercase - letters). - - - X - the argument is treated as an integer - and presented as a hexadecimal number (with uppercase - letters). - - + A type specifier that says what type the + argument data should be treated as. Possible types: + + + % - a literal percent character. No + argument is required. + + + b - the argument is treated as an + integer, and presented as a binary number. + + + c - the argument is treated as an + integer, and presented as the character with that ASCII + value. + + + d - the argument is treated as an + integer, and presented as a decimal number. + + + f - the argument is treated as a double, + and presented as a floating-point number. + + + o - the argument is treated as an + integer, and presented as an octal number. + + + s - the argument is treated as and + presented as a string. + + + x - the argument is treated as an integer + and presented as a hexadecimal number (with lowercase + letters). + + + X - the argument is treated as an integer + and presented as a hexadecimal number (with uppercase + letters). + +