From 920f57cd8a322d7a0ce8eea3b33e809660ec7498 Mon Sep 17 00:00:00 2001 From: Egon Schmid Date: Sat, 25 Aug 2001 21:08:41 +0000 Subject: [PATCH] Fix for #12957 reported by even@cycleburner.org and some whitespace. git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@55940 c90b9560-bf6c-de11-be94-00142212c4b1 --- functions/strings.xml | 60 ++++++++++++++++++++++--------------------- 1 file changed, 31 insertions(+), 29 deletions(-) diff --git a/functions/strings.xml b/functions/strings.xml index bfa379c0f2..9d45859462 100644 --- a/functions/strings.xml +++ b/functions/strings.xml @@ -1,5 +1,5 @@ - + String functions Strings @@ -1357,13 +1357,13 @@ echo "</PRE>\n"; "\n" (ASCII 13 - (0x0D)), a newline. + (0x0A)), a new line.(new line NL) "\r" (ASCII 10 - (0x0A)), a return. + (0x0D)), a carriage return. @@ -1375,7 +1375,7 @@ echo "</PRE>\n"; "\x0B" (ASCII 11 - (0x0B)), a . + (0x0B)), a vertical tab. @@ -1733,13 +1733,13 @@ echo $second[1]; /* prints "another" */ "\n" (ASCII 13 - (0x0D)), a newline. + (0x0A)), a new line (line feed). "\r" (ASCII 10 - (0x0A)), a return. + (0x0D)), a carriage return. @@ -1751,7 +1751,7 @@ echo $second[1]; /* prints "another" */ "\x0B" (ASCII 11 - (0x0B)), a . + (0x0B)), a vertical tab. @@ -1812,36 +1812,38 @@ $clean = rtrim($binary,"\0x00..\0x1F"); - The function sscanf is the input analog of - printf. sscanf reads from - the string str and interprets it according to - the specified format. If only two parameters were - passed to this function, the values parsed will be returned as an array. - - <function>sscanf</function> Example - + The function sscanf is the input analog of + printf. sscanf reads + from the string str and interprets it + according to the specified format. If only + two parameters were passed to this function, the values parsed + will be returned as an array. + + <function>sscanf</function> Example + // getting the serial number $serial = sscanf("SN/2350001","SN/%d"); // and the date of manufacturing $mandate = "January 01 2000"; list($month, $day, $year) = sscanf($mandate,"%s %d %d"); echo "Item $serial was manufactured on: $year-".substr($month,0,3)."-$day\n"; - - - If optional parameters are passed, the function will return the number of - assigned values. The optional parameters must be passed by reference. - - <function>sscanf</function> - using optional parameters - + + + If optional parameters are passed, the function will return the + number of assigned values. The optional parameters must be passed + by reference. + + <function>sscanf</function> - using optional parameters + // get author info and generate DocBook entry $auth = "24\tLewis Carroll"; $n = sscanf($auth,"%d\t%s %s", &$id, &$first, &$last); echo "<author id='$id'> - <firstname>$first</firstname> - <surname>$last</surname> + <firstname>$first</firstname> + <surname>$last</surname> </author>\n"; - - + + See also: fscanf, printf, @@ -3590,13 +3592,13 @@ echo substr_replace($var, '', 10, -1) . "<br>\n"; "\n" (ASCII 13 - (0x0D)), a newline. + (0x0A)), a new line (line feed). "\r" (ASCII 10 - (0x0A)), a return. + (0x0D)), a carriage return. @@ -3608,7 +3610,7 @@ echo substr_replace($var, '', 10, -1) . "<br>\n"; "\x0B" (ASCII 11 - (0x0B)), a . + (0x0B)), a vertical tab.