[PHP-DOC] cvs: phpdoc /en/functions strings.xml
derek Sat Dec 20 21:58:42 2003 EDT Modified files: /phpdoc/en/functionsstrings.xml Log: undoing changes Index: phpdoc/en/functions/strings.xml diff -u phpdoc/en/functions/strings.xml:1.174 phpdoc/en/functions/strings.xml:1.175 --- phpdoc/en/functions/strings.xml:1.174 Sat Dec 20 19:13:10 2003 +++ phpdoc/en/functions/strings.xml Sat Dec 20 21:58:42 2003 @@ -8,7 +8,7 @@ instead -- ?xml version=1.0 encoding=iso-8859-1? -!-- $Revision: 1.174 $ -- +!-- $Revision: 1.175 $ -- reference id=ref.strings titleString functions/title titleabbrevStrings/titleabbrev @@ -558,15 +558,11 @@ echo $foo; // foobar echo $foo,$bar; // foobarbarbaz -// Some people prefer passing multiple parameters to echo over concatenation. -echo 'This ', 'string ', 'was ', 'made ', 'with multiple parameters.', chr(10); -echo 'This ' . 'string ' . 'was ' . 'made ' . 'with concatenation.' . \n; - echo END This uses the here document syntax to output multiple lines with $variable interpolation. Note that the here document terminator must appear on a -line with just a semicolon. no extra whitespace! +line with just a semicolon no extra whitespace! END; // because echo is not a function, following code is invalid.
[PHP-DOC] cvs: phpdoc /en/functions strings.xml
derick Sat May 11 03:02:29 2002 EDT Modified files: /phpdoc/en/functionsstrings.xml Log: - Fix print documentation Index: phpdoc/en/functions/strings.xml diff -u phpdoc/en/functions/strings.xml:1.171 phpdoc/en/functions/strings.xml:1.172 --- phpdoc/en/functions/strings.xml:1.171 Wed Apr 17 15:58:45 2002 +++ phpdoc/en/functions/strings.xml Sat May 11 03:02:28 2002 -8,7 +8,7 instead -- ?xml version=1.0 encoding=iso-8859-1? -!-- $Revision: 1.171 $ -- +!-- $Revision: 1.172 $ -- reference id=ref.strings titleString functions/title titleabbrevStrings/titleabbrev -1696,10 +1696,10 /simpara para functionprint/function is not actually a real function (it is a - language construct) so you are not required to use parentheses - with it. But functionprint/function, opposed to - functionecho/function, can be called using a - link linkend=functions.variable-functionsvariable function/link. + language construct) so you are not required to use parentheses with it. + This also means that you can not use functionprint/function (just + like functionecho/function) as a link + linkend=functions.variable-functionsvariable function/link. /para example titlefunctionprint/function examples/title
[PHP-DOC] cvs: phpdoc /en/functions strings.xml
sander Wed Apr 3 06:21:57 2002 EDT Modified files: /phpdoc/en/functionsstrings.xml Log: Removed note from str_replace() and two minor whitespace fixes. Index: phpdoc/en/functions/strings.xml diff -u phpdoc/en/functions/strings.xml:1.169 phpdoc/en/functions/strings.xml:1.170 --- phpdoc/en/functions/strings.xml:1.169 Thu Mar 28 12:04:23 2002 +++ phpdoc/en/functions/strings.xml Wed Apr 3 06:21:56 2002 -1,5 +1,5 ?xml version=1.0 encoding=iso-8859-1? -!-- $Revision: 1.169 $ -- +!-- $Revision: 1.170 $ -- reference id=ref.strings titleString functions/title titleabbrevStrings/titleabbrev -3451,14 +3451,13 parameterreplace/parameter are arrays, then functionstr_replace/function takes a value from each array and uses them to do search and replace on - parametersubject/parameter. If + parametersubject/parameter. If parameterreplace/parameter has fewer values than parametersearch/parameter, then an empty string is used for - the rest of replacement values. If parametersearch/parameter + the rest of replacement values. If parametersearch/parameter is an array and parameterreplace/parameter is a string; then this replacement string is used for every value of - parametersearch/parameter. The converse would not make - sense, though. + parametersearch/parameter. /para para example
[PHP-DOC] cvs: phpdoc /en/functions strings.xml
sander Thu Mar 28 12:04:24 2002 EDT Modified files: /phpdoc/en/functionsstrings.xml Log: Sorted string functions. Index: phpdoc/en/functions/strings.xml diff -u phpdoc/en/functions/strings.xml:1.168 phpdoc/en/functions/strings.xml:1.169 --- phpdoc/en/functions/strings.xml:1.168 Thu Mar 28 11:38:17 2002 +++ phpdoc/en/functions/strings.xml Thu Mar 28 12:04:23 2002 -1,5 +1,5 ?xml version=1.0 encoding=iso-8859-1? -!-- $Revision: 1.168 $ -- +!-- $Revision: 1.169 $ -- reference id=ref.strings titleString functions/title titleabbrevStrings/titleabbrev -1537,6 +1537,25 /para /refsect1 /refentry + + refentry id=function.nl-langinfo + refnamediv +refnamenl_langinfo/refname +refpurpose + Query language and locale information +/refpurpose + /refnamediv + refsect1 +titleDescription/title + methodsynopsis + typestring/typemethodnamenl_langinfo/methodname + methodparamtypeint/typeparameteritem/parameter/methodparam + /methodsynopsis +para + warn.undocumented.func; +/para + /refsect1 + /refentry refentry id=function.nl2br refnamediv -4066,25 +4085,6 /para para See also functionnl2br/function. -/para - /refsect1 - /refentry - - refentry id='function.nl-langinfo' - refnamediv -refnamenl_langinfo/refname -refpurpose - Query language and locale information -/refpurpose - /refnamediv - refsect1 -titleDescription/title - methodsynopsis - typestring/typemethodnamenl_langinfo/methodname - methodparamtypeint/typeparameteritem/parameter/methodparam - /methodsynopsis -para - warn.undocumented.func; /para /refsect1 /refentry
[PHP-DOC] cvs: phpdoc /en/functions strings.xml
cortesi Sun Mar 24 19:43:51 2002 EDT Modified files: /phpdoc/en/functionsstrings.xml Log: going in direction of RFC 2606 Index: phpdoc/en/functions/strings.xml diff -u phpdoc/en/functions/strings.xml:1.166 phpdoc/en/functions/strings.xml:1.167 --- phpdoc/en/functions/strings.xml:1.166 Thu Mar 14 20:48:32 2002 +++ phpdoc/en/functions/strings.xml Sun Mar 24 19:43:51 2002 @@ -1,5 +1,5 @@ ?xml version=1.0 encoding=iso-8859-1? -!-- $Revision: 1.166 $ -- +!-- $Revision: 1.167 $ -- reference id=ref.strings titleString functions/title titleabbrevStrings/titleabbrev @@ -3205,9 +3205,9 @@ titlefunctionstrstr/function example/title programlisting role=php ![CDATA[ -$email = '[EMAIL PROTECTED]'; +$email = '[EMAIL PROTECTED]'; $domain = strstr($email, '@'); -print $domain; // prints @designmultimedia.com +print $domain; // prints @example.com ]] /programlisting /example
[PHP-DOC] cvs: phpdoc /en/functions strings.xml
torben Thu Mar 14 20:48:32 2002 EDT Modified files: /phpdoc/en/functionsstrings.xml Log: Fixed example typo in strtok(). Index: phpdoc/en/functions/strings.xml diff -u phpdoc/en/functions/strings.xml:1.165 phpdoc/en/functions/strings.xml:1.166 --- phpdoc/en/functions/strings.xml:1.165 Tue Mar 5 06:25:00 2002 +++ phpdoc/en/functions/strings.xml Thu Mar 14 20:48:32 2002 -1,5 +1,5 ?xml version=1.0 encoding=iso-8859-1? -!-- $Revision: 1.165 $ -- +!-- $Revision: 1.166 $ -- reference id=ref.strings titleString functions/title titleabbrevStrings/titleabbrev -3249,7 +3249,7 $tok = strtok($string, \n\t); while ($tok) { echo Word=$tokbr; -$tok = strtok( ); +$tok = strtok( \n\t); } ]] /programlisting
[PHP-DOC] cvs: phpdoc /en/functions strings.xml /en/language functions.xml
hholzgraTue Mar 5 06:25:00 2002 EDT Modified files: /phpdoc/en/language functionsxml /phpdoc/en/functionsstringsxml Log: trying to explain some consequences of the differences between language constructs echo and print Index: phpdoc/en/language/functionsxml diff -u phpdoc/en/language/functionsxml:124 phpdoc/en/language/functionsxml:125 --- phpdoc/en/language/functionsxml:124 Mon Jan 21 04:25:23 2002 +++ phpdoc/en/language/functionsxmlTue Mar 5 06:24:59 2002 -1,5 +1,5 ?xml version=10 encoding=iso-8859-1? -!-- $Revision: 124 $ -- +!-- $Revision: 125 $ -- chapter id=functions titleFunctions/title -332,11 +332,12 be used to implement callbacks, function tables, and so forth /para para -Variable functions won't work with language constructs such as +Variable functions won't work with language constructs other +than functionprint/function, such as functionecho/function, functionunset/function, -functionisset/function and functionempty/function This is -one of the major differences between PHP functions and language -constructs +functionisset/function and functionempty/function +This is one of the major differences between PHP functions +and languageconstructs /para para example Index: phpdoc/en/functions/stringsxml diff -u phpdoc/en/functions/stringsxml:1164 phpdoc/en/functions/stringsxml:1165 --- phpdoc/en/functions/stringsxml:1164 Wed Feb 27 17:09:11 2002 +++ phpdoc/en/functions/stringsxml Tue Mar 5 06:25:00 2002 -1,5 +1,5 ?xml version=10 encoding=iso-8859-1? -!-- $Revision: 1164 $ -- +!-- $Revision: 1165 $ -- reference id=refstrings titleString functions/title titleabbrevStrings/titleabbrev -518,6 +518,9 language construct) so you are not required to use parentheses with it In fact, if you want to pass more than one parameter to echo, you must not enclose the parameters within parentheses + It is not possible to use functionecho/function in a + link linkend=functionsvariable-functionsvariable function/link + context, but you can use functionprint/function instead example titlefunctionecho/function examples/title programlisting role=php -1657,9 +1660,11 Outputs parameterarg/parameter returnsuccess; /simpara para - functionprint/function is not actually a function (it is a + functionprint/function is not actually a real function (it is a language construct) so you are not required to use parentheses - with it + with it But functionprint/function, opposed to + functionecho/function, can be called using a + link linkend=functionsvariable-functionsvariable function/link /para example titlefunctionprint/function examples/title
[PHP-DOC] cvs: phpdoc /en/functions strings.xml swf.xml
nohnSun Feb 24 07:35:31 2002 EDT Modified files: /phpdoc/en/functionsstrings.xml swf.xml Log: Fixes some issues described in Bug #14219 Index: phpdoc/en/functions/strings.xml diff -u phpdoc/en/functions/strings.xml:1.162 phpdoc/en/functions/strings.xml:1.163 --- phpdoc/en/functions/strings.xml:1.162 Thu Feb 21 13:21:47 2002 +++ phpdoc/en/functions/strings.xml Sun Feb 24 07:35:30 2002 @@ -1,5 +1,5 @@ ?xml version=1.0 encoding=iso-8859-1? -!-- $Revision: 1.162 $ -- +!-- $Revision: 1.163 $ -- reference id=ref.strings titleString functions/title titleabbrevStrings/titleabbrev @@ -16,6 +16,12 @@ the link linkend=language.types.stringStrings/link entry in the link linkend=language.typesTypes/link section of the manual. + /para + para +For even more powerful string handling and manipulating functions +take a look at the link linkend=ref.regexPOSIX regular +expression functions/link and the link linkend=ref.pcrePerl +compatible regular expression functions/link /para /partintro Index: phpdoc/en/functions/swf.xml diff -u phpdoc/en/functions/swf.xml:1.28 phpdoc/en/functions/swf.xml:1.29 --- phpdoc/en/functions/swf.xml:1.28Wed Feb 13 21:44:51 2002 +++ phpdoc/en/functions/swf.xml Sun Feb 24 07:35:31 2002 @@ -1,5 +1,5 @@ ?xml version=1.0 encoding=iso-8859-1? -!-- $Revision: 1.28 $ -- +!-- $Revision: 1.29 $ -- reference id=ref.swf titleShockwave Flash functions/title titleabbrevSWF/titleabbrev @@ -84,6 +84,10 @@ The libswf does not have support for Windows. The development of that library has been stopped, and the source is not available to port it to another systems. +/para +para + For up to date SWF support take a look at the + link linkend=ref.mingMING/link functions. /para /note /partintro
[PHP-DOC] cvs: phpdoc /en/functions strings.xml
imajes Thu Feb 21 13:21:52 2002 EDT Modified files: /phpdoc/en/functionsstrings.xml Log: typo error for print function example. Index: phpdoc/en/functions/strings.xml diff -u phpdoc/en/functions/strings.xml:1.161 phpdoc/en/functions/strings.xml:1.162 --- phpdoc/en/functions/strings.xml:1.161 Tue Feb 12 04:13:12 2002 +++ phpdoc/en/functions/strings.xml Thu Feb 21 13:21:47 2002 @@ -1,5 +1,5 @@ ?xml version=1.0 encoding=iso-8859-1? -!-- $Revision: 1.161 $ -- +!-- $Revision: 1.162 $ -- reference id=ref.strings titleString functions/title titleabbrevStrings/titleabbrev @@ -1670,7 +1670,7 @@ print This spans\nmultiple lines. The newlines will be\noutput as well.; -print escaping characters is done \Like this\. +print escaping characters is done \Like this\.; // You can use variables inside of an print statement $foo = foobar;
[PHP-DOC] cvs: phpdoc /en/functions strings.xml
yohgaki Tue Feb 12 04:13:33 2002 EDT Modified files: /phpdoc/en/functionsstrings.xml Log: Clarify strstr() description a little Index: phpdoc/en/functions/strings.xml diff -u phpdoc/en/functions/strings.xml:1.160 phpdoc/en/functions/strings.xml:1.161 --- phpdoc/en/functions/strings.xml:1.160 Fri Feb 8 09:12:05 2002 +++ phpdoc/en/functions/strings.xml Tue Feb 12 04:13:12 2002 @@ -1,5 +1,5 @@ ?xml version=1.0 encoding=iso-8859-1? -!-- $Revision: 1.160 $ -- +!-- $Revision: 1.161 $ -- reference id=ref.strings titleString functions/title titleabbrevStrings/titleabbrev @@ -3172,8 +3172,9 @@ methodparamtypestring/typeparameterneedle/parameter/methodparam /methodsynopsis para - Returns all of parameterhaystack/parameter from the first - occurrence of parameterneedle/parameter to the end. + Returns part of parameterhaystack/parameter string from the + first occurrence of parameterneedle/parameter to the end of + parameterhaystack/parameter. /para para If parameterneedle/parameter is not found, returns false;.
[PHP-DOC] cvs: phpdoc /en/functions strings.xml
hholzgraFri Feb 8 06:25:52 2002 EDT Modified files: /phpdoc/en/functionsstrings.xml Log: added 2nd prototype variant for strtr() Index: phpdoc/en/functions/strings.xml diff -u phpdoc/en/functions/strings.xml:1.158 phpdoc/en/functions/strings.xml:1.159 --- phpdoc/en/functions/strings.xml:1.158 Sat Feb 2 10:36:09 2002 +++ phpdoc/en/functions/strings.xml Fri Feb 8 06:25:51 2002 @@ -1,5 +1,5 @@ ?xml version=1.0 encoding=iso-8859-1? -!-- $Revision: 1.158 $ -- +!-- $Revision: 1.159 $ -- reference id=ref.strings titleString functions/title titleabbrevStrings/titleabbrev @@ -3461,6 +3461,11 @@ methodparamtypestring/typeparameterstr/parameter/methodparam methodparamtypestring/typeparameterfrom/parameter/methodparam methodparamtypestring/typeparameterto/parameter/methodparam + /methodsynopsis + methodsynopsis + typestring/typemethodnamestrtr/methodname + methodparamtypestring/typeparameterstr/parameter/methodparam + +methodparamtypearray/typeparameterreplace_pairs/parameter/methodparam /methodsynopsis para This function returns a copy of parameterstr/parameter,
[PHP-DOC] cvs: phpdoc /en/functions strings.xml
derick Sun Jan 13 16:23:51 2002 EDT Modified files: /phpdoc/en/functionsstrings.xml Log: - Document print to be a language construct Index: phpdoc/en/functions/strings.xml diff -u phpdoc/en/functions/strings.xml:1.153 phpdoc/en/functions/strings.xml:1.154 --- phpdoc/en/functions/strings.xml:1.153 Sat Jan 12 18:32:00 2002 +++ phpdoc/en/functions/strings.xml Sun Jan 13 16:23:51 2002 @@ -1,5 +1,5 @@ ?xml version=1.0 encoding=iso-8859-1? -!-- $Revision: 1.153 $ -- +!-- $Revision: 1.154 $ -- reference id=ref.strings titleString functions/title titleabbrevStrings/titleabbrev @@ -1744,6 +1744,11 @@ simpara Outputs parameterarg/parameter. return.success; /simpara +para + functionprint/function is not actually a function (it is a + language construct) so you are not required to use parentheses + with it. +/para example titlefunctionprint/function examples/title programlisting role=php @@ -1761,7 +1766,7 @@ print escaping characters is done \Like this\. -//You can use variables inside of an print statement +// You can use variables inside of an print statement $foo = foobar; $bar = barbaz;
[PHP-DOC] cvs: phpdoc /en/functions strings.xml
irc-htmlSat Jan 12 18:32:01 2002 EDT Modified files: /phpdoc/en/functionsstrings.xml Log: bug #14935: example for addcslashes Index: phpdoc/en/functions/strings.xml diff -u phpdoc/en/functions/strings.xml:1.152 phpdoc/en/functions/strings.xml:1.153 --- phpdoc/en/functions/strings.xml:1.152 Wed Jan 9 21:11:28 2002 +++ phpdoc/en/functions/strings.xml Sat Jan 12 18:32:00 2002 @@ -1,5 +1,5 @@ ?xml version=1.0 encoding=iso-8859-1? -!-- $Revision: 1.152 $ -- +!-- $Revision: 1.153 $ -- reference id=ref.strings titleString functions/title titleabbrevStrings/titleabbrev @@ -67,9 +67,11 @@ informalexample programlisting role=php ![CDATA[ -echo addcslashes('foo[]', 'A..z'); -// All upper and lower-case letters will be escaped -// ... but so will the [\]^_` +echo addcslashes('foo[ ]', 'A..z'); +// output: \f\o\o\[ \] +// All upper and lower-case letters will be escaped +// ... but so will the [\]^_` and any tabs, line +// feeds, carriage returns, etc. ]] /programlisting /informalexample @@ -82,10 +84,7 @@ programlisting role=php ![CDATA[ echo addcslashes(zoo['.'], 'z..A'); -/* output: -\zoo['\.'] - -*/ +// output: \zoo['\.'] ]] /programlisting /informalexample
[PHP-DOC] cvs: phpdoc /en/functions strings.xml
irc-htmlWed Jan 9 21:11:29 2002 EDT Modified files: /phpdoc/en/functionsstrings.xml Log: addcslashes: doc bug #14935 Index: phpdoc/en/functions/strings.xml diff -u phpdoc/en/functions/strings.xml:1.151 phpdoc/en/functions/strings.xml:1.152 --- phpdoc/en/functions/strings.xml:1.151 Fri Jan 4 20:03:24 2002 +++ phpdoc/en/functions/strings.xml Wed Jan 9 21:11:28 2002 @@ -1,5 +1,5 @@ ?xml version=1.0 encoding=iso-8859-1? -!-- $Revision: 1.151 $ -- +!-- $Revision: 1.152 $ -- reference id=ref.strings titleString functions/title titleabbrevStrings/titleabbrev @@ -69,7 +69,7 @@ ![CDATA[ echo addcslashes('foo[]', 'A..z'); // All upper and lower-case letters will be escaped -// ... but so will the [\]^_` and space characters. +// ... but so will the [\]^_` ]] /programlisting /informalexample
[PHP-DOC] cvs: phpdoc /en/functions strings.xml
jimwWed Jan 2 06:54:08 2002 EDT Modified files: /phpdoc/en/functionsstrings.xml Log: str_repeat: see also substr_count Index: phpdoc/en/functions/strings.xml diff -u phpdoc/en/functions/strings.xml:1.147 phpdoc/en/functions/strings.xml:1.148 --- phpdoc/en/functions/strings.xml:1.147 Tue Jan 1 17:56:13 2002 +++ phpdoc/en/functions/strings.xml Wed Jan 2 06:54:08 2002 @@ -1,5 +1,5 @@ ?xml version=1.0 encoding=iso-8859-1? -!-- $Revision: 1.147 $ -- +!-- $Revision: 1.148 $ -- reference id=ref.strings titleString functions/title titleabbrevStrings/titleabbrev @@ -3182,6 +3182,9 @@ /example para This will output -=-=-=-=-=-=-=-=-=-=. +/para +para + See also functionsubstr_count/function. /para /refsect1 /refentry
[PHP-DOC] cvs: phpdoc /en/functions strings.xml
jimwWed Jan 2 07:26:33 2002 EDT Modified files: /phpdoc/en/functionsstrings.xml Log: chunk_split: one more prose tweak, fix see also of wordwrap Index: phpdoc/en/functions/strings.xml diff -u phpdoc/en/functions/strings.xml:1.149 phpdoc/en/functions/strings.xml:1.150 --- phpdoc/en/functions/strings.xml:1.149 Wed Jan 2 07:24:47 2002 +++ phpdoc/en/functions/strings.xml Wed Jan 2 07:26:33 2002 @@ -1,5 +1,5 @@ ?xml version=1.0 encoding=iso-8859-1? -!-- $Revision: 1.149 $ -- +!-- $Revision: 1.150 $ -- reference id=ref.strings titleString functions/title titleabbrevStrings/titleabbrev @@ -240,8 +240,8 @@ e.g. converting link linkend=function.base64-encodebase64_encode/link output to match RFC 2045 semantics. It inserts parameterend/parameter (defaults to - \r\n) every parameterchunklen/parameter (defaults to 76) chars. It - returns the new string leaving the original string untouched. + \r\n) every parameterchunklen/parameter characters (defaults to + 76). It returns the new string leaving the original string untouched. example titlefunctionchunk_split/function example/title programlisting role=php @@ -255,7 +255,7 @@ /para simpara See also functionexplode/function, functionsplit/function - and functionword_wrap/function. + and functionwordwrap/function. /simpara /refsect1 /refentry
[PHP-DOC] cvs: phpdoc /en/functions strings.xml
philip Tue Jan 1 17:56:14 2002 EDT Modified files: /phpdoc/en/functionsstrings.xml Log: Notes: Removed unneeded ones, modifed a few others. We don't need a note to declare when a function came into existence. chunk_split: See also explode, split and wordwrap Index: phpdoc/en/functions/strings.xml diff -u phpdoc/en/functions/strings.xml:1.146 phpdoc/en/functions/strings.xml:1.147 --- phpdoc/en/functions/strings.xml:1.146 Sun Dec 30 03:50:53 2001 +++ phpdoc/en/functions/strings.xml Tue Jan 1 17:56:13 2002 @@ -1,5 +1,5 @@ ?xml version=1.0 encoding=iso-8859-1? -!-- $Revision: 1.146 $ -- +!-- $Revision: 1.147 $ -- reference id=ref.strings titleString functions/title titleabbrevStrings/titleabbrev @@ -89,10 +89,6 @@ ]] /programlisting /informalexample - note - simpara - Added in PHP 4/simpara - /note /para para See also functionstripcslashes/function, @@ -257,14 +253,11 @@ ]] /programlisting /example - This function is significantly faster than - functionereg_replace/function. - note - para - This function was added in 3.0.6. - /para - /note /para +simpara + See also functionexplode/function, functionsplit/function + and functionword_wrap/function. +/simpara /refsect1 /refentry @@ -384,11 +377,6 @@ /listitem /itemizedlist /para -note - para - This function was added in PHP 4.0. - /para -/note /refsect1 /refentry @@ -1422,11 +1410,6 @@ para The constant CHAR_MAX is also defined for the use mentioned above. /para -note - para - Added in PHP 4.0.5 - /para -/note para See also: functionsetlocale/function. /para @@ -2616,11 +2599,6 @@ Note that this comparison is case sensitive, and unlike functionstrcmp/function this function is not binary safe. /simpara -note - simpara - Added in PHP 4.0.5. - /simpara -/note simpara See also functionereg/function, functionstrcmp/function, functionstrcasecmp/function, functionsubstr/function, @@ -2732,11 +2710,6 @@ Returns a string with backslashes stripped off. Recognizes C-like literal\n/literal, literal\r/literal ..., octal and hexadecimal representation. - note - simpara - Added in PHP4b3-dev. - /simpara - /note /para simpara See also functionaddcslashes/function. @@ -3210,11 +3183,6 @@ para This will output -=-=-=-=-=-=-=-=-=-=. /para -note - para - This function was added in PHP 4.0. - /para -/note /refsect1 /refentry @@ -3702,7 +3670,8 @@ /para note simpara - This feature (two arguments) was added in PHP 4.0. + This optional parameterto/parameter and + parameterfrom/parameter parameters were added in PHP 4.0.0 /simpara /note para @@ -3910,11 +3879,6 @@ See also functionstr_replace/function and functionsubstr/function. /para -note - simpara - functionsubstr_replace/function was added in PHP 4.0. - /simpara -/note /refsect1 /refentry @@ -3943,7 +3907,8 @@ /funcsynopsis note simpara - The second parameter was added in PHP 4.1.0 + The optional parametercharlist/parameter parameter was + added in PHP 4.1.0 /simpara /note para @@ -4222,7 +4187,7 @@ (See second example). note para - The parametercut/parameter parameter was added in PHP 4.0.3. + The optional parametercut/parameter parameter was added in PHP 4.0.3 /para /note /para
[PHP-DOC] cvs: phpdoc /en/functions strings.xml
georg Sun Dec 30 03:50:53 2001 EDT Modified files: /phpdoc/en/functionsstrings.xml Log: fixed bug 14761 (typo) Index: phpdoc/en/functions/strings.xml diff -u phpdoc/en/functions/strings.xml:1.145 phpdoc/en/functions/strings.xml:1.146 --- phpdoc/en/functions/strings.xml:1.145 Thu Dec 20 18:05:09 2001 +++ phpdoc/en/functions/strings.xml Sun Dec 30 03:50:53 2001 @@ -1,5 +1,5 @@ ?xml version=1.0 encoding=iso-8859-1? -!-- $Revision: 1.145 $ -- +!-- $Revision: 1.146 $ -- reference id=ref.strings titleString functions/title titleabbrevStrings/titleabbrev @@ -1513,7 +1513,7 @@ literal../literal you can specify a range of characters. /para example - titleUsuage example of functionltrim/function/title + titleUsage example of functionltrim/function/title para programlisting role=php ![CDATA[ @@ -1995,7 +1995,7 @@ literal../literal you can specify a range of characters. /para example - titleUsuage example of functionrtrim/function/title + titleUsage example of functionrtrim/function/title para programlisting role=php ![CDATA[ @@ -3998,7 +3998,7 @@ literal../literal you can specify a range of characters. /para example - titleUsuage example of functiontrim/function/title + titleUsage example of functiontrim/function/title para programlisting role=php ![CDATA[
[PHP-DOC] cvs: phpdoc /en/functions strings.xml
jimwThu Dec 20 17:38:53 2001 EDT Modified files: /phpdoc/en/functionsstrings.xml Log: strstr: update see also list Index: phpdoc/en/functions/strings.xml diff -u phpdoc/en/functions/strings.xml:1.143 phpdoc/en/functions/strings.xml:1.144 --- phpdoc/en/functions/strings.xml:1.143 Mon Dec 17 17:29:42 2001 +++ phpdoc/en/functions/strings.xml Thu Dec 20 17:38:53 2001 @@ -1,5 +1,5 @@ ?xml version=1.0 encoding=iso-8859-1? -!-- $Revision: 1.143 $ -- +!-- $Revision: 1.144 $ -- reference id=ref.strings titleString functions/title titleabbrevStrings/titleabbrev @@ -3374,14 +3374,12 @@ If parameterneedle/parameter is not a string, it is converted to an integer and applied as the ordinal value of a character. /para -para - note - para - Note that this function is case-sensitive. For - case-insensitive searches, use functionstristr/function. - /para - /note -/para +note + para + This function is case-sensitive. For case-insensitive searches, use + functionstristr/function. + /para +/note para example titlefunctionstrstr/function example/title @@ -3395,9 +3393,10 @@ /example /para para - See also functionstrchr/function, functionstristr/function, - functionstrrchr/function, functionsubstr/function, and - functionereg/function. + See also functionereg/function, functionpreg_match/function, + functionstrchr/function, functionstristr/function, + functionstrpos/function, functionstrrchr/function, and + functionsubstr/function. /para /refsect1 /refentry
[PHP-DOC] cvs: phpdoc /en/functions strings.xml
jimwThu Dec 20 18:05:10 2001 EDT Modified files: /phpdoc/en/functionsstrings.xml Log: substr: fix examples and explanations related to negative starts and lengths, clean up layout Index: phpdoc/en/functions/strings.xml diff -u phpdoc/en/functions/strings.xml:1.144 phpdoc/en/functions/strings.xml:1.145 --- phpdoc/en/functions/strings.xml:1.144 Thu Dec 20 17:38:53 2001 +++ phpdoc/en/functions/strings.xml Thu Dec 20 18:05:09 2001 @@ -1,5 +1,5 @@ ?xml version=1.0 encoding=iso-8859-1? -!-- $Revision: 1.144 $ -- +!-- $Revision: 1.145 $ -- reference id=ref.strings titleString functions/title titleabbrevStrings/titleabbrev @@ -3742,59 +3742,58 @@ character at position literal2/literal is 'literalc/literal', and so forth. /para -para - Examples: - informalexample - programlisting role=php +example + titleBasic functionsubstr/function usage/title + programlisting role=php ![CDATA[ $rest = substr(abcdef, 1);// returns bcdef $rest = substr(abcdef, 1, 3); // returns bcd +$rest = substr(abcdef, 0, 4); // returns abcd +$rest = substr(abcdef, 0, 8); // returns abcdef ]] - /programlisting - /informalexample -/para + /programlisting +/example para If parameterstart/parameter is negative, the returned string will start at the parameterstart/parameter'th character from the end of parameterstring/parameter./para -para - Examples: - informalexample - programlisting role=php +example + titleUsing a negative parameterstart/parameter/title + programlisting role=php ![CDATA[ $rest = substr(abcdef, -1);// returns f $rest = substr(abcdef, -2);// returns ef $rest = substr(abcdef, -3, 1); // returns d ]] - /programlisting - /informalexample -/para + /programlisting +/example para - If parameterlength/parameter is given and is positive, the - string returned will end parameterlength/parameter characters - from parameterstart/parameter. If this would result in a - string with negative length (because the start is past the end of - the string), then the returned string will contain the single - character at parameterstart/parameter. + If parameterlength/parameter is given and is positive, the string + returned will contain at most parameterlength/parameter characters + beginning from parameterstart/parameter (depending on the length of + parameterstring/parameter. If parameterstring/parameter is less + than parameterstart/parameter characters long, false; will be + returned. /para para - If parameterlength/parameter is given and is negative, the - string returned will end parameterlength/parameter characters - from the end of parameterstring/parameter. If this would - result in a string with negative length, then the returned string - will contain the single character at - parameterstart/parameter. + If parameterlength/parameter is given and is negative, then that many + characters will be omitted from the end of parameterstring/parameter + (after the start position has been calculated when a + parameterstart/parameter is negative). If + parameterstart/parameter denotes a position beyond this truncation, + an empty string will be returned. /para -para - Examples: - informalexample - programlisting role=php +example + titleUsing a negative parameterlength/parameter/title + programlisting role=php ![CDATA[ -$rest = substr(abcdef, 1, -1); // returns bcde +$rest = substr(abcdef, 0, -1); // returns abcde +$rest = substr(abcdef, 2, -1); // returns cde +$rest = substr(abcdef, 4, -4); // returns +$rest = substr(abcdef, -3, -1); // returns de ]] - /programlisting - /informalexample -/para + /programlisting +/example para See also functionstrrchr/function and functionereg/function.
[PHP-DOC] cvs: phpdoc /en/functions strings.xml
hholzgraMon Dec 17 14:49:49 2001 EDT Modified files: /phpdoc/en/functionsstrings.xml Log: added skeleton for missing function Index: phpdoc/en/functions/strings.xml diff -u phpdoc/en/functions/strings.xml:1.141 phpdoc/en/functions/strings.xml:1.142 --- phpdoc/en/functions/strings.xml:1.141 Sun Dec 16 15:38:08 2001 +++ phpdoc/en/functions/strings.xml Mon Dec 17 14:49:37 2001 @@ -1,5 +1,5 @@ ?xml version=1.0 encoding=iso-8859-1? -!-- $Revision: 1.141 $ -- +!-- $Revision: 1.142 $ -- reference id=ref.strings titleString functions/title titleabbrevStrings/titleabbrev @@ -4291,6 +4291,26 @@ /refsect1 /refentry + refentry id='function.nl-langinfo' + refnamediv +refnamenl_langinfo/refname +refpurpose + Query language and locale information +/refpurpose + /refnamediv + refsect1 +titleDescription/title +funcsynopsis + funcprototype + funcdefstring functionnl_langinfo/function/funcdef + paramdefint parameteritem/parameter/paramdef + /funcprototype +/funcsynopsis +para + warn.undocumented.func; +/para + /refsect1 + /refentry /reference
[PHP-DOC] cvs: phpdoc /en/functions strings.xml
jimwMon Dec 17 17:29:42 2001 EDT Modified files: /phpdoc/en/functionsstrings.xml Log: htmlentites,htmlspecialchars: document version third argument was added Index: phpdoc/en/functions/strings.xml diff -u phpdoc/en/functions/strings.xml:1.142 phpdoc/en/functions/strings.xml:1.143 --- phpdoc/en/functions/strings.xml:1.142 Mon Dec 17 14:49:37 2001 +++ phpdoc/en/functions/strings.xml Mon Dec 17 17:29:42 2001 @@ -1,5 +1,5 @@ ?xml version=1.0 encoding=iso-8859-1? -!-- $Revision: 1.142 $ -- +!-- $Revision: 1.143 $ -- reference id=ref.strings titleString functions/title titleabbrevStrings/titleabbrev @@ -754,11 +754,6 @@ /informalexample The content of literal$original/literal would be: Hallo amp; lt;Frau amp; Krauml;mer. - note - para - This function was added in PHP 4.0. - /para - /note /para para See also: functionhtmlspecialchars/function, @@ -914,12 +909,13 @@ /para para At present, the ISO-8859-1 character set is used as default. - Note that the optional second argument was added in PHP 3.0.17 - and PHP 4.0.3. + Support for the optional second argument was added in PHP 3.0.17 and PHP + 4.0.3. /para para Like functionhtmlspecialchars/function, it takes an optional third argument which defines character set used in conversion. + Support for this argument was added in PHP 4.1.0. /para para See also functionhtmlspecialchars/function and @@ -1012,12 +1008,13 @@ para Note that this function does not translate anything beyond what is listed above. For full entity translation, see - functionhtmlentities/function. Also note that the optional + functionhtmlentities/function. Support for the optional second argument was added in PHP 3.0.17 and PHP 4.0.3. /para para The third argument defines character set used in conversion. The - default character set is ISO-8859-1. + default character set is ISO-8859-1. Support for this third argument was + added in PHP 4.1.0. /para para See also functionhtmlentities/function and
[PHP-DOC] cvs: phpdoc /en/functions strings.xml
derick Sun Dec 16 05:34:01 2001 EDT Modified files: /phpdoc/en/functionsstrings.xml Log: - Added changed strtok behavior to the manual Index: phpdoc/en/functions/strings.xml diff -u phpdoc/en/functions/strings.xml:1.139 phpdoc/en/functions/strings.xml:1.140 --- phpdoc/en/functions/strings.xml:1.139 Sat Dec 15 09:52:19 2001 +++ phpdoc/en/functions/strings.xml Sun Dec 16 05:34:01 2001 @@ -1,5 +1,5 @@ ?xml version=1.0 encoding=iso-8859-1? -!-- $Revision: 1.139 $ -- +!-- $Revision: 1.140 $ -- reference id=ref.strings titleString functions/title titleabbrevStrings/titleabbrev @@ -3424,6 +3424,41 @@ multiple tokens in the token parameter. The string will be tokenized when any one of the characters in the argument are found. +/para +para + The behavior when an empty part was found changed with PHP 4.1.0. The old + behavior returned an empty string, while the new, correct, behavior + simply skips the part of the string: + example + titleOld functionstrtok/function behavior/title + programlisting role=php +![CDATA[ +$first_token = strtok('/something', '/'); +$second_token = strtok('/'); +var_dump ($first_token, $second_token); + +/* Output: +string(0) +string(9) something +*/ +]] + /programlisting + /example + example + titleNew functionstrtok/function behavior/title + programlisting role=php +![CDATA[ +$first_token = strtok('/something', '/'); +$second_token = strtok('/'); +var_dump ($first_token, $second_token); + +/* Output: +string(9) something +bool(false) +*/ +]] + /programlisting + /example /para para Also be careful that your tokens may be equal to 0. This
[PHP-DOC] cvs: phpdoc /en/functions strings.xml
hholzgraSat Dec 15 09:52:27 2001 EDT Modified files: /phpdoc/en/functionsstrings.xml Log: added str_rot13 Index: phpdoc/en/functions/strings.xml diff -u phpdoc/en/functions/strings.xml:1.138 phpdoc/en/functions/strings.xml:1.139 --- phpdoc/en/functions/strings.xml:1.138 Fri Dec 14 15:27:08 2001 +++ phpdoc/en/functions/strings.xml Sat Dec 15 09:52:19 2001 @@ -1,5 +1,5 @@ ?xml version=1.0 encoding=iso-8859-1? -!-- $Revision: 1.138 $ -- +!-- $Revision: 1.139 $ -- reference id=ref.strings titleString functions/title titleabbrevStrings/titleabbrev @@ -1868,6 +1868,30 @@ functionnl2br/function, and functionstripslashes/function. /simpara + /refsect1 + /refentry + + refentry id='function.str-rot13' + refnamediv +refnamestr_rot13/refname +refpurposePerform the rot13 transform on a string/refpurpose + /refnamediv + refsect1 +titleDescription/title +funcsynopsis + funcprototype + funcdefstring functionstr_rot13/function/funcdef + paramdefstring parameterstr/parameter/paramdef + /funcprototype +/funcsynopsis +para + This function performs the ROT13 encoding on the + parameterstr/parameter argument and returns the resulting + string. The ROT13 encoding simply shifts every letter by 13 + places in the alphabet while leaving non-alpha characters + untouched. Encoding and decoding are done by the same function, + passing an encoded string as argument will return the original version. +/para /refsect1 /refentry
[PHP-DOC] cvs: phpdoc /en/functions strings.xml
jimwFri Dec 14 15:09:33 2001 EDT Modified files: /phpdoc/en/functionsstrings.xml Log: strpos: fix pre-4.0b3 example Index: phpdoc/en/functions/strings.xml diff -u phpdoc/en/functions/strings.xml:1.136 phpdoc/en/functions/strings.xml:1.137 --- phpdoc/en/functions/strings.xml:1.136 Wed Dec 12 15:47:30 2001 +++ phpdoc/en/functions/strings.xml Fri Dec 14 15:09:33 2001 @@ -1,5 +1,5 @@ ?xml version=1.0 encoding=iso-8859-1? -!-- $Revision: 1.136 $ -- +!-- $Revision: 1.137 $ -- reference id=ref.strings titleString functions/title titleabbrevStrings/titleabbrev @@ -3017,7 +3017,7 @@ // in versions older than 4.0b3: $pos = strpos($mystring, b); -if (is_string($pos) !$pos) { +if (!is_integer($pos)) { // not found... } ]]
[PHP-DOC] cvs: phpdoc /en/functions strings.xml
jimwFri Dec 14 15:27:08 2001 EDT Modified files: /phpdoc/en/functionsstrings.xml Log: print: return.success;, add examples Index: phpdoc/en/functions/strings.xml diff -u phpdoc/en/functions/strings.xml:1.137 phpdoc/en/functions/strings.xml:1.138 --- phpdoc/en/functions/strings.xml:1.137 Fri Dec 14 15:09:33 2001 +++ phpdoc/en/functions/strings.xml Fri Dec 14 15:27:08 2001 @@ -1,5 +1,5 @@ ?xml version=1.0 encoding=iso-8859-1? -!-- $Revision: 1.137 $ -- +!-- $Revision: 1.138 $ -- reference id=ref.strings titleString functions/title titleabbrevStrings/titleabbrev @@ -1741,10 +1741,49 @@ /funcprototype /funcsynopsis simpara - Outputs parameterarg/parameter. + Outputs parameterarg/parameter. return.success; /simpara +example + titlefunctionprint/function examples/title + programlisting role=php +![CDATA[ +?php +print(Hello World); + +print print() also works without parentheses.; + +print This spans +multiple lines. The newlines will be +output as well; + +print This spans\nmultiple lines. The newlines will be\noutput as well.; + +print escaping characters is done \Like this\. + +//You can use variables inside of an print statement +$foo = foobar; +$bar = barbaz; + +print foo is $foo; // foo is foobar + +// Using single quotes will print the variable name, not the value +print 'foo is $foo'; // foo is $foo + +// If you are not using any other characters, you can just print variables +print $foo; // foobar + +print END +This uses the here document syntax to output +multiple lines with $variable interpolation. Note +that the here document terminator must appear on a +line with just a semicolon no extra whitespace! +END; +? +]] + /programlisting + /example simpara - See also: functionecho/function, functionprintf/function, + See also functionecho/function, functionprintf/function, and functionflush/function. /simpara /refsect1
[PHP-DOC] cvs: phpdoc /en/functions strings.xml
derick Wed Dec 12 02:53:11 2001 EDT Modified files: /phpdoc/en/functionsstrings.xml Log: - Add md5_file documentation Index: phpdoc/en/functions/strings.xml diff -u phpdoc/en/functions/strings.xml:1.134 phpdoc/en/functions/strings.xml:1.135 --- phpdoc/en/functions/strings.xml:1.134 Sat Dec 8 18:39:06 2001 +++ phpdoc/en/functions/strings.xml Wed Dec 12 02:53:11 2001 @@ -1,5 +1,5 @@ ?xml version=1.0 encoding=iso-8859-1? -!-- $Revision: 1.134 $ -- +!-- $Revision: 1.135 $ -- reference id=ref.strings titleString functions/title titleabbrevStrings/titleabbrev @@ -1539,7 +1539,36 @@ The hash is a 32-character hexadecimal number. /para para - See also functioncrc32/function. + See also: functioncrc32/function and functionmd5_file/function +/para + /refsect1 + /refentry + + refentry id=function.md5-file + refnamediv +refnamemd5_file/refname +refpurposeCalculates the md5 hash of a given filename/refpurpose + /refnamediv + refsect1 +titleDescription/title +funcsynopsis + funcprototype + funcdefstring functionmd5_file/function/funcdef + paramdefstring parameterfilename/parameter/paramdef + /funcprototype +/funcsynopsis +para + Calculates the MD5 hash of the specified + parameterfilename/parameter using the + ulink url=url.rfc;rfc1321.htmlRSA Data Security, Inc. + MD5 Message-Digest Algorithm/ulink, and returns that hash. +/para +para + This function has the same purpose of the command line utility + md5sum. +/para +para + See also: functionmd5/function and functioncrc32/function /para /refsect1 /refentry
[PHP-DOC] cvs: phpdoc /en/functions strings.xml
jimwSat Dec 8 14:46:08 2001 EDT Modified files: /phpdoc/en/functionsstrings.xml Log: echo: add example using here documents Index: phpdoc/en/functions/strings.xml diff -u phpdoc/en/functions/strings.xml:1.130 phpdoc/en/functions/strings.xml:1.131 --- phpdoc/en/functions/strings.xml:1.130 Fri Dec 7 16:27:53 2001 +++ phpdoc/en/functions/strings.xml Sat Dec 8 14:46:08 2001 @@ -1,5 +1,5 @@ ?xml version=1.0 encoding=iso-8859-1? -!-- $Revision: 1.130 $ -- +!-- $Revision: 1.131 $ -- reference id=ref.strings titleString functions/title titleabbrevStrings/titleabbrev @@ -557,6 +557,13 @@ // If you are not using any other characters, you can just echo variables echo $foo; // foobar echo $foo,$bar; // foobarbarbaz + +echo END +This uses the here document syntax to output +multiple lines with $variable interpolation. Note +that the here document terminator must appear on a +line with just a semicolon no extra whitespace! +END; // because echo is not a function, following code is invalid. ($some_var) ? echo('true'): echo('false');
[PHP-DOC] cvs: phpdoc /en/functions strings.xml
jimwSat Dec 8 15:04:38 2001 EDT Modified files: /phpdoc/en/functionsstrings.xml Log: note length of md5 hash Index: phpdoc/en/functions/strings.xml diff -u phpdoc/en/functions/strings.xml:1.131 phpdoc/en/functions/strings.xml:1.132 --- phpdoc/en/functions/strings.xml:1.131 Sat Dec 8 14:46:08 2001 +++ phpdoc/en/functions/strings.xml Sat Dec 8 15:04:38 2001 @@ -1,5 +1,5 @@ ?xml version=1.0 encoding=iso-8859-1? -!-- $Revision: 1.131 $ -- +!-- $Revision: 1.132 $ -- reference id=ref.strings titleString functions/title titleabbrevStrings/titleabbrev @@ -1536,9 +1536,10 @@ Calculates the MD5 hash of parameterstr/parameter using the ulink url=url.rfc;rfc1321.htmlRSA Data Security, Inc. MD5 Message-Digest Algorithm/ulink, and returns that hash. + The hash is a 32-character hexadecimal number. /para para - See also: functioncrc32/function + See also functioncrc32/function. /para /refsect1 /refentry
[PHP-DOC] cvs: phpdoc /en/functions strings.xml
jimwSat Dec 8 16:21:50 2001 EDT Modified files: /phpdoc/en/functionsstrings.xml Log: parse_str: incorporate user notes Index: phpdoc/en/functions/strings.xml diff -u phpdoc/en/functions/strings.xml:1.132 phpdoc/en/functions/strings.xml:1.133 --- phpdoc/en/functions/strings.xml:1.132 Sat Dec 8 15:04:38 2001 +++ phpdoc/en/functions/strings.xml Sat Dec 8 16:21:50 2001 @@ -1,5 +1,5 @@ ?xml version=1.0 encoding=iso-8859-1? -!-- $Revision: 1.132 $ -- +!-- $Revision: 1.133 $ -- reference id=ref.strings titleString functions/title titleabbrevStrings/titleabbrev @@ -1677,6 +1677,11 @@ the second parameter parameterarr/parameter is present, variables are stored in this variable as an array elements instead. /para +note + para + Support for the optional second parameter was added in PHP 4.0.3. + /para +/note para example titleUsing functionparse_str/function/title @@ -1690,6 +1695,10 @@ ]] /programlisting /example +/para +para + See also functionset_magic_quotes_runtime/function + and functionurldecode/function. /para /refsect1 /refentry
[PHP-DOC] cvs: phpdoc /en/functions strings.xml
jimwSat Dec 8 18:39:07 2001 EDT Modified files: /phpdoc/en/functionsstrings.xml Log: soundex: see alsos Index: phpdoc/en/functions/strings.xml diff -u phpdoc/en/functions/strings.xml:1.133 phpdoc/en/functions/strings.xml:1.134 --- phpdoc/en/functions/strings.xml:1.133 Sat Dec 8 16:21:50 2001 +++ phpdoc/en/functions/strings.xml Sat Dec 8 18:39:06 2001 @@ -1,5 +1,5 @@ ?xml version=1.0 encoding=iso-8859-1? -!-- $Revision: 1.133 $ -- +!-- $Revision: 1.134 $ -- reference id=ref.strings titleString functions/title titleabbrevStrings/titleabbrev @@ -1572,11 +1572,6 @@ lt;[EMAIL PROTECTED]. It is described in [Practical Algorithms for Programmers, Binstock amp; Rex, Addison Wesley, 1995]. - note - para - This function was added in PHP 4.0. - /para - /note /para /refsect1 /refentry @@ -2129,6 +2124,10 @@ ]] /programlisting /example +/para +para + See also functionlevenshtein/function, + functionmetaphone/function, and functionsimilar_text/function. /para /refsect1 /refentry
[PHP-DOC] cvs: phpdoc /en/functions strings.xml
jimwFri Dec 7 16:27:53 2001 EDT Modified files: /phpdoc/en/functionsstrings.xml Log: explode: add example, clean up text a little Index: phpdoc/en/functions/strings.xml diff -u phpdoc/en/functions/strings.xml:1.129 phpdoc/en/functions/strings.xml:1.130 --- phpdoc/en/functions/strings.xml:1.129 Tue Dec 4 14:17:54 2001 +++ phpdoc/en/functions/strings.xml Fri Dec 7 16:27:53 2001 @@ -1,5 +1,5 @@ ?xml version=1.0 encoding=iso-8859-1? -!-- $Revision: 1.129 $ -- +!-- $Revision: 1.130 $ -- reference id=ref.strings titleString functions/title titleabbrevStrings/titleabbrev @@ -612,14 +612,15 @@ boundaries formed by the string parameterseparator/parameter. If parameterlimit/parameter is set, the returned array will contain a maximum of parameterlimit/parameter elements with - the last element containing the whole rest of - parameterstring/parameter. If an empty string () is used - as the parameterseparator/parameter argument, then + the last element containing the rest of + parameterstring/parameter. +/para +para + If parameterseparator/parameter is an empty string (), functionexplode/function will return false;. If - parameterseparator/parameter contains a value that is not - contained in the parameterstring/parameter argument, - thenfunctionexplode/function will return the - parameterstring/parameter argument. + parameterseparator/parameter contains a value that is not contained + in parameterstring/parameter, then functionexplode/function will + return an array containing parameterstring/parameter. /para note para @@ -629,11 +630,14 @@ /note para example - titlefunctionexplode/function example/title + titlefunctionexplode/function examples/title programlisting role=php ![CDATA[ $pizza = piece1 piece2 piece3 piece4 piece5 piece6; $pieces = explode( , $pizza); + +$data = foo:*:1023:1000::/home/foo:/bin/sh; +list($user,$pass,$uid,$gid,$gecos,$home,$shell) = explode(:,$data); ]] /programlisting /example
[PHP-DOC] cvs: phpdoc /en/functions strings.xml
hholzgraTue Dec 4 14:17:54 2001 EDT Modified files: /phpdoc/en/functionsstrings.xml Log: fixed mistyped CDATA end tag, parse_str should show up again tomorrow Index: phpdoc/en/functions/strings.xml diff -u phpdoc/en/functions/strings.xml:1.128 phpdoc/en/functions/strings.xml:1.129 --- phpdoc/en/functions/strings.xml:1.128 Mon Dec 3 16:59:00 2001 +++ phpdoc/en/functions/strings.xml Tue Dec 4 14:17:54 2001 @@ -1,5 +1,5 @@ ?xml version=1.0 encoding=iso-8859-1? -!-- $Revision: 1.128 $ -- +!-- $Revision: 1.129 $ -- reference id=ref.strings titleString functions/title titleabbrevStrings/titleabbrev @@ -1628,7 +1628,7 @@ if (ord($str) == 10) { echo The first character of \$str is a line feed.\n; } -] +]] /programlisting /example /para
[PHP-DOC] cvs: phpdoc /en/functions strings.xml
philip Wed Nov 21 13:39:06 2001 EDT Modified files: /phpdoc/en/functionsstrings.xml Log: Expanded examples for ucwords() and ucfirst() a bit. Index: phpdoc/en/functions/strings.xml diff -u phpdoc/en/functions/strings.xml:1.124 phpdoc/en/functions/strings.xml:1.125 --- phpdoc/en/functions/strings.xml:1.124 Mon Nov 19 08:46:48 2001 +++ phpdoc/en/functions/strings.xml Wed Nov 21 13:39:05 2001 @@ -1,5 +1,5 @@ ?xml version=1.0 encoding=iso-8859-1? -!-- $Revision: 1.124 $ -- +!-- $Revision: 1.125 $ -- reference id=ref.strings titleString functions/title titleabbrevStrings/titleabbrev @@ -3788,15 +3788,17 @@ example titlefunctionucfirst/function example/title programlisting role=php -$text = 'mary had a little lamb and she loved it so.'; -$text = ucfirst($text); // $text is now Mary had a little lamb - // and she loved it so. +$foo = 'hello world!'; +$foo = ucfirst($text);// Hello world! + +$bar = 'HELLO WORLD!'; +$bar = ucfirst($bar); // HELLO WORLD! +$bar = ucfirst(strtolower($bar)); // Hello world! /programlisting /example /para para - See also functionstrtolower/function and - functionstrtoupper/function, + See also functionstrtolower/function, functionstrtoupper/function, and functionucwords/function. /para /refsect1 @@ -3824,9 +3826,12 @@ example titlefunctionucwords/function example/title programlisting role=php -$text = mary had a little lamb and she loved it so.; -$text = ucwords($text); // $text is now: Mary Had A Little -// Lamb And She Loved It So. +$foo = 'hello world!'; +$foo = ucwords($foo); // Hello World! + +$bar = 'HELLO WORLD!'; +$bar = ucwords($bar); // HELLO WORLD! +$bar = ucwords(strtolower($bar)); // Hello World! /programlisting /example note
[PHP-DOC] cvs: phpdoc /en/functions strings.xml
philip Wed Nov 21 14:13:25 2001 EDT Modified files: /phpdoc/en/functionsstrings.xml Log: Typo fix from previous commit. Index: phpdoc/en/functions/strings.xml diff -u phpdoc/en/functions/strings.xml:1.125 phpdoc/en/functions/strings.xml:1.126 --- phpdoc/en/functions/strings.xml:1.125 Wed Nov 21 13:39:05 2001 +++ phpdoc/en/functions/strings.xml Wed Nov 21 14:13:24 2001 @@ -1,5 +1,5 @@ ?xml version=1.0 encoding=iso-8859-1? -!-- $Revision: 1.125 $ -- +!-- $Revision: 1.126 $ -- reference id=ref.strings titleString functions/title titleabbrevStrings/titleabbrev @@ -3789,7 +3789,7 @@ titlefunctionucfirst/function example/title programlisting role=php $foo = 'hello world!'; -$foo = ucfirst($text);// Hello world! +$foo = ucfirst($foo); // Hello world! $bar = 'HELLO WORLD!'; $bar = ucfirst($bar); // HELLO WORLD!
[PHP-DOC] cvs: phpdoc /en/functions strings.xml
zak Mon Nov 19 08:46:50 2001 EDT Modified files: /phpdoc/en/functionsstrings.xml Log: Added terse docs for vprintf()/vsprintf(). Corrected return value for printf() Index: phpdoc/en/functions/strings.xml diff -u phpdoc/en/functions/strings.xml:1.123 phpdoc/en/functions/strings.xml:1.124 --- phpdoc/en/functions/strings.xml:1.123 Mon Nov 12 11:50:43 2001 +++ phpdoc/en/functions/strings.xml Mon Nov 19 08:46:48 2001 @@ -1,5 +1,5 @@ ?xml version=1.0 encoding=iso-8859-1? -!-- $Revision: 1.123 $ -- +!-- $Revision: 1.124 $ -- reference id=ref.strings titleString functions/title titleabbrevStrings/titleabbrev @@ -1682,7 +1682,7 @@ titleDescription/title funcsynopsis funcprototype - funcdefint functionprintf/function/funcdef + funcdefvoid functionprintf/function/funcdef paramdefstring parameterformat/parameter/paramdef paramdefmixed parameteroptionalargs/optional/parameter... @@ -3845,6 +3845,69 @@ /refsect1 /refentry + refentry id=function.vprintf + refnamediv +refnamevprintf/refname +refpurposeOutput a formatted string/refpurpose + /refnamediv + refsect1 +titleDescription/title +funcsynopsis + funcprototype + funcdefvoid functionvprintf/function/funcdef + paramdefstring parameterformat/parameter/paramdef + paramdefarray + parameterargs/parameter + /paramdef + /funcprototype +/funcsynopsis +simpara + Display array values as a formatted string according to + parameterformat/parameter (which is described in the documentation + for functionsprintf/function). +/simpara +simpara + Operates as functionprintf/function but accepts an array of + arguments, rather than a variable number of arguments. +/simpara +simpara + See also: functionprintf/function, functionsprintf/function, + functionvsprintf/function +/simpara + /refsect1 + /refentry + + refentry id=function.vsprintf + refnamediv +refnamevsprintf/refname +refpurposeReturn a formatted string/refpurpose + /refnamediv + refsect1 +titleDescription/title +funcsynopsis + funcprototype + funcdefstring functionvsprintf/function/funcdef + paramdefstring parameterformat/parameter/paramdef + paramdefarray + parameterargs/parameter + /paramdef + /funcprototype +/funcsynopsis +simpara + Return array values as a formatted string according to + parameterformat/parameter (which is described in the documentation + for functionsprintf/function). +/simpara +simpara + Operates as functionsprintf/function but accepts an array of + arguments, rather than a variable number of arguments. +/simpara +simpara + See also: functionsprintf/function, functionvsprintf/function, + functionvprintf/function +/simpara + /refsect1 + /refentry refentry id=function.wordwrap refnamediv
[PHP-DOC] cvs: phpdoc /en/functions strings.xml
jimwThu Nov 1 17:58:31 2001 EDT Modified files: /phpdoc/en/functionsstrings.xml Log: add strrev() example Index: phpdoc/en/functions/strings.xml diff -u phpdoc/en/functions/strings.xml:1.119 phpdoc/en/functions/strings.xml:1.120 --- phpdoc/en/functions/strings.xml:1.119 Tue Oct 30 19:45:52 2001 +++ phpdoc/en/functions/strings.xml Thu Nov 1 17:58:31 2001 @@ -1,5 +1,5 @@ ?xml encoding=iso-8859-1? -!-- $Revision: 1.119 $ -- +!-- $Revision: 1.120 $ -- reference id=ref.strings titleString functions/title titleabbrevStrings/titleabbrev @@ -3039,6 +3039,14 @@ /funcsynopsis para Returns parameterstring/parameter, reversed. + example + titleReversing a string with functionstrrev/function/title + programlisting role=php +lt;php +echo strrev(Hello world!); // outputs !dlrow olleH +?gt; + /programlisting + /example /para /refsect1 /refentry
[PHP-DOC] cvs: phpdoc /en/functions strings.xml
jimwTue Oct 30 19:45:52 2001 EDT Modified files: /phpdoc/en/functionsstrings.xml Log: add see also for ucwords to strtolower, strtoupper, and ucfirst Index: phpdoc/en/functions/strings.xml diff -u phpdoc/en/functions/strings.xml:1.118 phpdoc/en/functions/strings.xml:1.119 --- phpdoc/en/functions/strings.xml:1.118 Sun Oct 28 20:51:33 2001 +++ phpdoc/en/functions/strings.xml Tue Oct 30 19:45:52 2001 @@ -1,5 +1,5 @@ ?xml encoding=iso-8859-1? -!-- $Revision: 1.118 $ -- +!-- $Revision: 1.119 $ -- reference id=ref.strings titleString functions/title titleabbrevStrings/titleabbrev @@ -3275,8 +3275,9 @@ /programlisting /example para - See also functionstrtoupper/function - and functionucfirst/function. + See also functionstrtoupper/function, + functionucfirst/function, + and functionucwords/function. /para /refsect1 /refentry @@ -3312,8 +3313,9 @@ /programlisting /example para - See also functionstrtolower/function - and functionucfirst/function. + See also functionstrtolower/function, + functionucfirst/function, + and functionucwords/function. /para /refsect1 /refentry @@ -3789,8 +3791,9 @@ /example /para para - See also functionstrtoupper/function and - functionstrtolower/function. + See also functionstrtolower/function and + functionstrtoupper/function, + and functionucwords/function. /para /refsect1 /refentry
[PHP-DOC] cvs: phpdoc /en/functions strings.xml
jimwSun Oct 28 20:51:34 2001 EDT Modified files: /phpdoc/en/functionsstrings.xml Log: add warning to strip_tags() about attributes being passed through, add u to the example, and clean up the notice of what versions the allowable_tags param was added in. Index: phpdoc/en/functions/strings.xml diff -u phpdoc/en/functions/strings.xml:1.117 phpdoc/en/functions/strings.xml:1.118 --- phpdoc/en/functions/strings.xml:1.117 Wed Oct 17 12:24:00 2001 +++ phpdoc/en/functions/strings.xml Sun Oct 28 20:51:33 2001 @@ -1,5 +1,5 @@ ?xml encoding=iso-8859-1? -!-- $Revision: 1.117 $ -- +!-- $Revision: 1.118 $ -- reference id=ref.strings titleString functions/title titleabbrevStrings/titleabbrev @@ -2506,8 +2506,8 @@ should not be stripped. note para - parameterAllowable_tags/parameter was added in PHP 3.0.13, - PHP4B3. + parameterallowable_tags/parameter was added in PHP 3.0.13 + and PHP 4.0b3. /para /note /para @@ -2515,10 +2515,19 @@ example titlefunctionstrip_tags/function example/title programlisting role=php -$string = strip_tags($string, 'lt;agt;lt;bgt;lt;igt;'); +$string = strip_tags($string, 'lt;agt;lt;bgt;lt;igt;lt;ugt;'); /programlisting /example /para +warning + para + This function does not modify any attributes on the tags that you allow + using parameterallowable_tags/parameter, including the + literalstyle/literal and literalonmouseover/literal attributes + that a mischievous user may abuse when posting text that will be shown + to other users. + /para +/warning /refsect1 /refentry
[PHP-DOC] cvs: phpdoc /en/functions strings.xml /ja/chapters install.xml /ja/functions strings.xml
hirokawaThu Oct 4 09:00:01 2001 EDT Modified files: /phpdoc/en/functionsstrings.xml /phpdoc/ja/chapters install.xml /phpdoc/ja/functionsstrings.xml Log: fixed some jade errors (deleted some old links.) Index: phpdoc/en/functions/strings.xml diff -u phpdoc/en/functions/strings.xml:1.114 phpdoc/en/functions/strings.xml:1.115 --- phpdoc/en/functions/strings.xml:1.114 Fri Sep 21 19:21:07 2001 +++ phpdoc/en/functions/strings.xml Thu Oct 4 09:00:00 2001 @@ -1,5 +1,5 @@ ?xml encoding=iso-8859-1? -!-- $Revision: 1.114 $ -- +!-- $Revision: 1.115 $ -- reference id=ref.strings titleString functions/title titleabbrevStrings/titleabbrev @@ -838,6 +838,9 @@ paramdefint parameteroptionalquote_style/optional/parameter /paramdef + paramdefstring + parameteroptionalcharset/optional/parameter + /paramdef /funcprototype /funcsynopsis para @@ -854,8 +857,13 @@ both double and single quotes unconverted. /para para - At present, the ISO-8859-1 character set is used. Note that the - optional second argument was added in PHP 3.0.17 and PHP 4.0.3. + At present, the ISO-8859-1 character set is used as default. + Note that the optional second argument was added in PHP 3.0.17 + and PHP 4.0.3. +/para +para + Like functionhtmlspecialchars/function, it takes an optional + third argument which defines character set used in conversion. /para para See also functionhtmlspecialchars/function and @@ -880,6 +888,9 @@ paramdefint parameteroptionalquote_style/optional/parameter /paramdef + paramdefstring + parameteroptionalcharset/optional/parameter + /paramdef /funcprototype /funcsynopsis para @@ -945,6 +956,10 @@ is listed above. For full entity translation, see functionhtmlentities/function. Also note that the optional second argument was added in PHP 3.0.17 and PHP 4.0.3. +/para +para + The third argument defines character set used in conversion. The + default character set is ISO-8859-1. /para para See also functionhtmlentities/function and Index: phpdoc/ja/chapters/install.xml diff -u phpdoc/ja/chapters/install.xml:1.37 phpdoc/ja/chapters/install.xml:1.38 --- phpdoc/ja/chapters/install.xml:1.37 Sun Aug 12 12:37:40 2001 +++ phpdoc/ja/chapters/install.xml Thu Oct 4 09:00:00 2001 @@ -396,10 +396,7 @@ 異なる機能が必要な場合には、PHPやWebサーバを構築する必要を生じる 可能性があります。ソフトウエアの構築およびコンパイルに不慣れな場 合、必要とする機能を有するパッケージ版のPHPが既に構築されていない - かどうかを調べる価値があります。 - ulink url=url.lightyear;Lightyear Design/ulink は、 - ulink url=url.tenon;Tenon Intersystems/ulink と同様に - OS X用にコンパイルした構築前バージョンのPHPを提供しています。 + かどうかを調べることを推奨します。 /simpara /sect2 @@ -3227,12 +3224,9 @@ simpara PWS と IIS においては、filenamebrowscap.ini/filenameを 次のように指定することができます。: - Windows 9x/Me では 'c:\windows\system\inetsrv\browscap.ini' 、 - NT/2000 サーバーでは + Windows 9x/Me では 'c:\windows\system\inetsrv\browscap.ini'、 + NT/2000 サーバーでは、 'c:\winnt\system32\inetsrv\browscap.ini' - PHP における browscap 機能に関する詳細な情報については、 - この ulink url=url.browscap;ミラーサーバー/ulink を見て、 - source ボタンを押して動作を確認下さい。 /simpara /listitem /itemizedlist Index: phpdoc/ja/functions/strings.xml diff -u phpdoc/ja/functions/strings.xml:1.41 phpdoc/ja/functions/strings.xml:1.42 --- phpdoc/ja/functions/strings.xml:1.41Mon Aug 13 04:11:37 2001 +++ phpdoc/ja/functions/strings.xml Thu Oct 4 09:00:00 2001 @@ -782,6 +782,11 @@ replaceableoptionalquote_style/optional/replaceable /parameter /paramdef + paramdefstring + parameter + replaceableoptionalcharset/optional/replaceable + /parameter + /paramdef /funcprototype /funcsynopsis para @@ -796,7 +801,10 @@ オートを共に変換しません。 /para para - 現在のところ、ISO-8859-1 文字セットが使われます。 + 現在のところ、ISO-8859-1 +文字セットがデフォルトの文字エンコーディ + ングとして使用されます。3番目の引数 + parametercharset/parameterにて他の文字エンコーディングを指定 + することも可能です。 /para para functionhtmlspecialchars/function および
[PHP-DOC] cvs: phpdoc /en/functions strings.xml
philip Fri Sep 14 21:46:42 2001 EDT Modified files: /phpdoc/en/functionsstrings.xml Log: Added a note saying magic_quotes_gpc is ON by default, under addslashes description. Hopefully will encourage people to read about magic_quotes_gpc. Index: phpdoc/en/functions/strings.xml diff -u phpdoc/en/functions/strings.xml:1.109 phpdoc/en/functions/strings.xml:1.110 --- phpdoc/en/functions/strings.xml:1.109 Thu Sep 13 03:49:58 2001 +++ phpdoc/en/functions/strings.xml Fri Sep 14 21:46:41 2001 @@ -1,5 +1,5 @@ ?xml encoding=iso-8859-1? -!-- $Revision: 1.109 $ -- +!-- $Revision: 1.110 $ -- reference id=ref.strings titleString functions/title titleabbrevStrings/titleabbrev @@ -117,6 +117,11 @@ (literal/literal), backslash (literal\/literal) and NUL (the null; byte). /para +note + para + link linkend=ini.magic-quotes-gpcmagic_quotes_gpc/link is ON by default. + /para +/note para See also functionstripslashes/function, functionhtmlspecialchars/function, and
[PHP-DOC] cvs: phpdoc /en/functions strings.xml
jeroen Sun Aug 26 18:41:56 2001 EDT Modified files: /phpdoc/en/functionsstrings.xml Log: More WS Index: phpdoc/en/functions/strings.xml diff -u phpdoc/en/functions/strings.xml:1.107 phpdoc/en/functions/strings.xml:1.108 --- phpdoc/en/functions/strings.xml:1.107 Sat Aug 25 20:55:53 2001 +++ phpdoc/en/functions/strings.xml Sun Aug 26 18:41:56 2001 @@ -1,5 +1,5 @@ ?xml encoding=iso-8859-1? -!-- $Revision: 1.107 $ -- +!-- $Revision: 1.108 $ -- reference id=ref.strings titleString functions/title titleabbrevStrings/titleabbrev @@ -279,32 +279,32 @@ itemizedlist listitem simpara - k - koi8-r +k - koi8-r /simpara /listitem listitem simpara - w - windows-1251 +w - windows-1251 /simpara /listitem listitem simpara - i - iso8859-5 +i - iso8859-5 /simpara /listitem listitem simpara - a - x-cp866 +a - x-cp866 /simpara /listitem listitem simpara - d - x-cp866 +d - x-cp866 /simpara /listitem listitem simpara - m - x-mac-cyrillic +m - x-mac-cyrillic /simpara /listitem /itemizedlist @@ -341,30 +341,30 @@ itemizedlist listitem simpara - 0 - an array with the byte-value as key and the frequency of - every byte as value. +0 - an array with the byte-value as key and the frequency of +every byte as value. /simpara /listitem listitem simpara - 1 - same as 0 but only byte-values with a frequency greater - than zero are listed. +1 - same as 0 but only byte-values with a frequency greater +than zero are listed. /simpara /listitem listitem simpara - 2 - same as 0 but only byte-values with a frequency equal to - zero are listed. +2 - same as 0 but only byte-values with a frequency equal to +zero are listed. /simpara /listitem listitem simpara - 3 - a string containing all used byte-values is returned. +3 - a string containing all used byte-values is returned. /simpara /listitem listitem simpara - 4 - a string containing all not used byte-values is returned. +4 - a string containing all not used byte-values is returned. /simpara /listitem /itemizedlist @@ -447,7 +447,7 @@ salt is generated once. If you are calling this function recursively, this may impact both appearance and, to a certain extent, security. -/simpara +/simpara simpara The standard DES encryption functioncrypt/function contains the salt as the first two characters of the output. @@ -560,7 +560,7 @@ I have lt;?=$foo? foo. /programlisting /informalexample -/para +/para simpara See also: functionprint/function, @@ -582,7 +582,7 @@ funcdefarray functionexplode/function/funcdef paramdefstring parameterseparator/parameter/paramdef paramdefstring parameterstring/parameter/paramdef - paramdefint + paramdefint parameteroptionallimit/optional/parameter /paramdef /funcprototype @@ -1017,7 +1017,7 @@ refnamediv refnamelevenshtein/refname refpurpose - Calculate Levenshtein distance between two strings + Calculate Levenshtein distance between two strings /refpurpose /refnamediv refsect1 @@ -1059,7 +1059,7 @@ length of parameterstr1/parameter and parameterstr2/parameter (rather good when compared to functionsimilar_text/function, which is O(max(n,m)**3), - but still expensive). + but still expensive). /para para In its simplest form the function will take only the two @@ -1085,37 +1085,37 @@ itemizedlist listitem simpara - operation to apply: 'I', 'R' or 'D' +operation to apply: 'I', 'R' or 'D' /simpara /listitem listitem simpara - actual character in string 1 +actual character in string 1 /simpara /listitem listitem simpara - actual character in string 2 +actual character in string 2 /simpara /listitem listitem simpara - position in string 1 +position in string 1 /simpara /listitem listitem simpara - position in string 2 +position in string 2 /simpara /listitem listitem simpara - remaining characters in string 1 +remaining characters in string 1 /simpara /listitem listitem simpara - remaining characters in string 2 +remaining characters in
[PHP-DOC] cvs: phpdoc /en/functions strings.xml
eschmid Sat Aug 25 19:01:29 2001 EDT Modified files: /phpdoc/en/functionsstrings.xml Log: Only whitespace changes. Index: phpdoc/en/functions/strings.xml diff -u phpdoc/en/functions/strings.xml:1.105 phpdoc/en/functions/strings.xml:1.106 --- phpdoc/en/functions/strings.xml:1.105 Sat Aug 25 17:08:41 2001 +++ phpdoc/en/functions/strings.xml Sat Aug 25 19:01:28 2001 @@ -1,5 +1,5 @@ ?xml encoding=iso-8859-1? -!-- $Revision: 1.105 $ -- +!-- $Revision: 1.106 $ -- reference id=ref.strings titleString functions/title titleabbrevStrings/titleabbrev @@ -10,7 +10,6 @@ specialized sections can be found in the regular expression and URL handling sections. /simpara - para For information on how strings behave, especially with regard to usage of single quotes, double quotes, and escape sequences, see @@ -58,23 +57,23 @@ $escaped = addcslashes($not_escaped, \0..\37!@\177..\377); /programlisting /example - /para - para -When you define a sequence of characters in the charlist argument -make sure that you know what characters come between the characters -that you set as the start and end of the range. +/para +para + When you define a sequence of characters in the charlist argument + make sure that you know what characters come between the + characters that you set as the start and end of the range. informalexample programlisting role=php echo addcslashes('foo[]', 'A..z'); // All upper and lower-case letters will be escaped -// ..but so will the [\]^_` and space characters. +// ... but so will the [\]^_` and space characters. /programlisting /informalexample - -Also, if the first character in a range has a lower ASCII value -than the second character in the range, no range will be constructed. -Only the start, end and period characters will be escaped. Use the -functionord/function function to find the ASCII value for a character. + Also, if the first character in a range has a lower ASCII value + than the second character in the range, no range will be + constructed. Only the start, end and period characters will be + escaped. Use the functionord/function function to find the + ASCII value for a character. informalexample programlisting role=php echo addcslashes(zoo['.'], 'z..A'); @@ -84,7 +83,6 @@ */ /programlisting /informalexample - note simpara Added in PHP 4/simpara @@ -393,13 +391,13 @@ /funcprototype /funcsynopsis para -Generates the cyclic redundancy checksum polynomial of 32-bit lengths of -the parameterstr/parameter. This is usually used to validate the -integrity of data being transmitted. -/para - para - See also: functionmd5/function - /para + Generates the cyclic redundancy checksum polynomial of 32-bit + lengths of the parameterstr/parameter. This is usually used + to validate the integrity of data being transmitted. +/para +para + See also: functionmd5/function +/para /refsect1 /refentry @@ -488,7 +486,7 @@ uses a one-way algorithm. /simpara simpara - See also: functionmd5/function. + See also: functionmd5/function. /simpara /refsect1 /refentry @@ -591,21 +589,24 @@ /funcsynopsis para Returns an array of strings, each of which is a substring of - parameterstring/parameter formed by splitting it on boundaries formed - by the string parameterseparator/parameter. - If parameterlimit/parameter is set, the returned array will contain - a maximum of parameterlimit/parameter elements with the last element - containing the whole rest of parameterstring/parameter. - If an empty string () is used as the parameterseparator/parameter - argument, then functionexplode/function will return false;. - If parameterseparator/parameter contains a value that is not contained in - the parameterstring/parameter argument, thenfunctionexplode/function - will return the parameterstring/parameter argument. + parameterstring/parameter formed by splitting it on + boundaries formed by the string parameterseparator/parameter. + If parameterlimit/parameter is set, the returned array will + contain a maximum of parameterlimit/parameter elements with + the last element containing the whole rest of + parameterstring/parameter. If an empty string () is used + as the parameterseparator/parameter argument, then + functionexplode/function will return false;. If + parameterseparator/parameter contains a value that is not + contained in the parameterstring/parameter argument, + thenfunctionexplode/function will return the + parameterstring/parameter argument. /para note para - The
Re: [PHP-DOC] Re: Space between funcname arglist (was: Re: [PHP-DOC] cvs: phpdoc /en/functions strings.xml)
Egon: I would see a space. The formatted function prototypes have already a space between function name and opening parenthesis. With the space the code is more readable. The first can be changed, though I can come into your second point: better readable. In the case of a prototype, I must agree that it is better readable with a space. However, in code I prefer the PEAR-way. Since I prototype is such a different thing than a real-life function call, I think it doesn't matter too much that it isn't the 'right' way. Different point, in prototypes I sometimes see the proto: return_type function(void). Why not simply return_type function(). That looks way more logical to me, also keeping in mind that void is really a keyword that has no meaning in PHP, and PHP-programmers won't (need to) know it (unless they know it from some other language) Greetz, Jeroen
[PHP-DOC] cvs: phpdoc /en/functions strings.xml
jeroen Thu Aug 9 16:52:57 2001 EDT Modified files: /phpdoc/en/functionsstrings.xml Log: Documented new second parameter of trim, ltrim and rtrim (and chop of course) Index: phpdoc/en/functions/strings.xml diff -u phpdoc/en/functions/strings.xml:1.102 phpdoc/en/functions/strings.xml:1.103 --- phpdoc/en/functions/strings.xml:1.102 Sun Aug 5 18:49:38 2001 +++ phpdoc/en/functions/strings.xml Thu Aug 9 16:52:55 2001 @@ -1,5 +1,5 @@ ?xml encoding=iso-8859-1? -!-- $Revision: 1.102 $ -- +!-- $Revision: 1.103 $ -- reference id=ref.strings titleString functions/title titleabbrevStrings/titleabbrev @@ -153,37 +153,20 @@ refentry id=function.chop refnamediv refnamechop/refname -refpurposeRemove trailing whitespace/refpurpose +refpurposeAlias of functionrtrim/function/refpurpose /refnamediv refsect1 titleDescription/title -funcsynopsis - funcprototype - funcdefstring functionchop/function/funcdef - paramdefstring parameterstr/parameter/paramdef - /funcprototype -/funcsynopsis para - Returns the argument string without trailing whitespace, - including newlines. - example - titlefunctionchop/function example/title - programlisting role=php -$trimmed = chop($line); - /programlisting - /example + This function is an alias of functionrtrim/function. /para note para functionchop/function is different than the Perl - parameterchop()/parameter function, which removes the last + literalchop()/literal function, which removes the last character in the string. /para /note -para - See also functiontrim/function, functionltrim/function, - functionrtrim/function, and functionchop/function. -/para /refsect1 /refentry @@ -1323,6 +1306,7 @@ /refsect1 /refentry + !-- this section is nearly-identical to trim, ltrim and rtrim -- refentry id=function.ltrim refnamediv refnameltrim/refname @@ -1334,19 +1318,96 @@ titleDescription/title funcsynopsis funcprototype - funcdefstring functionltrim/function/funcdef - paramdefstring parameterstr/parameter/paramdef + funcdefstring + functionltrim/function + /funcdef + paramdefstring + parameterstr/parameter + /paramdef + paramdefstring + parameteroptionalcharlist/optional/parameter + /paramdef /funcprototype /funcsynopsis para This function returns a string with whitespace stripped from the - beginning of parameterstr/parameter. The whitespace - characters it currently strips are: \n, \r, \t, \v, \0, - and a plain space. + beginning of parameterstr/parameter. + Without the second parameter, + functionltrim/function will strip these characters: + !-- sorted by importance. Printed 3 times: trim, ltrim, rtrim -- + itemizedlist + listitem + simpara + (acronymASCII/acronym literal32/literal +(literal0x20/literal)), an ordinary space. + /simpara + /listitem + listitem + simpara +\t (acronymASCII/acronym literal9/literal +(literal0x09/literal)), a tab. + /simpara + /listitem + listitem + simpara +\n (acronymASCII/acronym literal13/literal +(literal0x0D/literal)), a newline. + /simpara + /listitem + listitem + simpara +\r (acronymASCII/acronym literal10/literal +(literal0x0A/literal)), a return. + /simpara + /listitem + listitem + simpara +\0 (acronymASCII/acronym literal0/literal +(literal0x00/literal)), the literalNUL/literal-byte. + /simpara + /listitem + listitem + simpara !-- not \v, since not supported by PHP -- +\x0B (acronymASCII/acronym literal11/literal +(literal0x0B/literal)), a !-- TODO: --. + /simpara + /listitem + /itemizedlist +/para +para + You can also specify the characters you want to strip, by means + of the parametercharlist/parameter parameter. + Simply list all characters that you want to be stripped. With + literal../literal you can specify a range of characters. /para +example + titleUsuage example of functionltrim/function/title + para + programlisting role=php +![CDATA[ +?php + +$text = \t\tThese are a few words :) ... ; +$trimmed = ltrim($text); +// $trimmed = These are a few words :) ... +$trimmed = ltrim($text, \t.); +// $trimmed = These are a few words :) ... +$clean = ltrim($binary,\0x00..\0x1F); +// trim the ASCII control characters at the beginning of $binary +// (from 0 to 31 inclusive) + +? +]] + /programlisting + /para +/example +note + simpara + The second parameter was added in PHP 4.0.7 + /simpara +/note para - See also functionchop/function,
Re: [PHP-DOC] Re: Space between funcname arglist (was: Re:[PHP-DOC] cvs: phpdoc /en/functions strings.xml)
on 8/08/01 0:06, Jeroen van Wolffelaar at [EMAIL PROTECTED] wrote: From PEAR coding standards (function calls): I got those one from README file in phpdoc/README. I do agree with the no space between function name and opening parenthesis. At least, we should be coherent with the rest of the PHP team on this. Before we change this convention, does anyone have opinion about this? I wonder what was the reason about this (I guess it's one of those fashion that cross informatics coding world). Right now, here is the situation : no space : +2 space: 0 Best regards, Damien Seguy
Re: [PHP-DOC] Re: Space between funcname arglist (was: Re: [PHP-DOC] cvs: phpdoc /en/functions strings.xml)
On Wed, Aug 08, 2001 at 09:51:50AM +0200, Damien Seguy wrote: on 8/08/01 0:06, Jeroen van Wolffelaar at [EMAIL PROTECTED] wrote: From PEAR coding standards (function calls): I got those one from README file in phpdoc/README. I do agree with the no space between function name and opening parenthesis. At least, we should be coherent with the rest of the PHP team on this. Before we change this convention, does anyone have opinion about this? I wonder what was the reason about this (I guess it's one of those fashion that cross informatics coding world). Right now, here is the situation : no space : +2 space: 0 I would see a space. The formatted function prototypes have already a space between function name and opening parenthesis. With the space the code is more readable. -1 (space) -Egon -- All known books about PHP and related books: http://php.net/books.php Concert Band of the University of Hohenheim: http://www.concert-band.de/ First and second bestselling book in German: http://www.php-buch.de/
Re: [PHP-DOC] Re: Space between funcname arglist (was: Re:[PHP-DOC] cvs: phpdoc /en/functions strings.xml)
on 8/08/01 18:32, Hojtsy Gabor at [EMAIL PROTECTED] wrote: Right now, here is the situation : no space : +2 space: 0 Latest update : Right now, here is the situation : no space : +3 space: +1 Anyone else want to state about this? let's keep the polls open, this is vacation time. Damien Seguy
Re: [PHP-DOC] Re: Space between funcname arglist (was: Re:[PHP-DOC] cvs: phpdoc /en/functions strings.xml)
Damien Seguy writes: on 8/08/01 18:32, Hojtsy Gabor at [EMAIL PROTECTED] wrote: Right now, here is the situation : no space : +2 space: 0 Latest update : Right now, here is the situation : no space : +3 space: +1 Anyone else want to state about this? let's keep the polls open, this is vacation time. Damien Seguy No space +1. -- Torben Wilson [EMAIL PROTECTED] http://www.thebuttlesschaps.com +1.604.709.0506
Re: [PHP-DOC] cvs: phpdoc /en/functions strings.xml
on 6/08/01 0:49, Jeroen van Wolffelaar at [EMAIL PROTECTED] wrote: jeroenSun Aug 5 18:49:38 2001 EDT Modified files: /phpdoc/en/functionsstrings.xml Log: Fix examles (whitespace between funcname and parameters), and a few entities MMM, I thought that whitespace between funcname and open parenthesis was standard guideline for docs. README : 8. If an example of using arguments specific to a newer version of php, it is helpful to note that in the example: foo_function_exec (bar, baz); // second argument was added in PHP 4.0.3 I don't use it on French docs thought, but I make it consistent on the whole fr tree. I do respect this on English tree. Moreover, why don't you do some testing on nl tree before making such important changes on the whole en tree? I think that experimenting somewhat is really good for all of us. Best regards, Damien Seguy
[PHP-DOC] Re: Space between funcname arglist (was: Re: [PHP-DOC] cvs: phpdoc /en/functions strings.xml)
MMM, I thought that whitespace between funcname and open parenthesis was standard guideline for docs. README : 8. If an example of using arguments specific to a newer version of php, it is helpful to note that in the example: foo_function_exec (bar, baz); // second argument was added in PHP 4.0.3 From PEAR coding standards (function calls): Functions should be called with no spaces between the function name, the opening parenthesis, and the first parameter (etc) I assumed that was the standard for the documentation too... am I wrong? Jeroen
[PHP-DOC] cvs: phpdoc /en/functions strings.xml
jeroen Sun Aug 5 18:49:38 2001 EDT Modified files: /phpdoc/en/functionsstrings.xml Log: Fix examles (whitespace between funcname and parameters), and a few entities Index: phpdoc/en/functions/strings.xml diff -u phpdoc/en/functions/strings.xml:1.101 phpdoc/en/functions/strings.xml:1.102 --- phpdoc/en/functions/strings.xml:1.101 Sun Aug 5 06:51:46 2001 +++ phpdoc/en/functions/strings.xml Sun Aug 5 18:49:38 2001 @@ -1,5 +1,5 @@ ?xml encoding=iso-8859-1? -!-- $Revision: 1.101 $ -- +!-- $Revision: 1.102 $ -- reference id=ref.strings titleString functions/title titleabbrevStrings/titleabbrev @@ -22,7 +22,7 @@ refentry id=function.addcslashes refnamediv -refnameAddCSlashes/refname +refnameaddcslashes/refname refpurposeQuote string with slashes in a C style/refpurpose /refnamediv refsect1 @@ -55,7 +55,7 @@ example titlefunctionaddcslashes/function example/title programlisting role=php -$escaped = addcslashes ($not_escaped, \0..\37!@\177..\377); +$escaped = addcslashes($not_escaped, \0..\37!@\177..\377); /programlisting /example /para @@ -101,7 +101,7 @@ refentry id=function.addslashes refnamediv -refnameAddSlashes/refname +refnameaddslashes/refname refpurposeQuote string with slashes/refpurpose /refnamediv refsect1 @@ -169,7 +169,7 @@ example titlefunctionchop/function example/title programlisting role=php -$trimmed = chop ($line); +$trimmed = chop($line); /programlisting /example /para @@ -206,11 +206,11 @@ example titlefunctionchr/function example/title programlisting role=php -$str .= chr (27); /* add an escape character at the end of $str */ +$str .= chr(27); /* add an escape character at the end of $str */ /* Often this is more useful */ -$str = sprintf (The string ends in escape: %c, 27); +$str = sprintf(The string ends in escape: %c, 27); /programlisting /example This function complements functionord/function. See also @@ -252,7 +252,7 @@ programlisting role=php # format $data using RFC 2045 semantics -$new_string = chunk_split (base64_encode($data)); +$new_string = chunk_split(base64_encode($data)); /programlisting /example This function is significantly faster than @@ -560,7 +560,7 @@ // However, the following examples will work: ($some_var) ? print('true'): print('false'); // print is a function -echo ($some_var) ? 'true': 'false'; // changing the statement around +echo $some_var ? 'true': 'false'; // changing the statement around ? /programlisting /example @@ -623,7 +623,7 @@ titlefunctionexplode/function example/title programlisting role=php $pizza = piece1 piece2 piece3 piece4 piece5 piece6; -$pieces = explode ( , $pizza); +$pieces = explode( , $pizza); /programlisting /example /para @@ -681,9 +681,9 @@ example titleTranslation Table Example/title programlisting role=php -$trans = get_html_translation_table (HTML_ENTITIES); +$trans = get_html_translation_table(HTML_ENTITIES); $str = Hallo amp; lt;Frau amp; Krauml;mer; -$encoded = strtr ($str, $trans); +$encoded = strtr($str, $trans); /programlisting /example The literal$encoded/literal variable will now contain: Hallo @@ -696,8 +696,8 @@ the direction of the translation. informalexample programlisting role=php -$trans = array_flip ($trans); -$original = strtr ($str, $trans); +$trans = array_flip($trans); +$original = strtr($str, $trans); /programlisting /informalexample The content of literal$original/literal would be: Hallo amp; @@ -970,7 +970,7 @@ example titlefunctionimplode/function example/title programlisting role=php -$colon_separated = implode (:, $array); +$colon_separated = implode(:, $array); /programlisting /example /para @@ -1465,7 +1465,7 @@ example titlefunctionord/function example/title programlisting role=php -if (ord ($str) == 10) { +if (ord($str) == 10) { echo The first character of \$str is a line feed.\n; } /programlisting @@ -1636,7 +1636,7 @@ example titlefunctionrtrim/function example/title programlisting role=php -$trimmed = rtrim ($line); +$trimmed = rtrim($line); /programlisting /example /para @@ -1841,12 +1841,12 @@ example titleSoundex Examples/title programlisting role=php -soundex (Euler) == soundex (Ellery) == 'E460'; -soundex (Gauss) == soundex (Ghosh) == 'G200'; -soundex (Hilbert) == soundex (Heilbronn) == 'H416'; -soundex (Knuth) == soundex (Kant) == 'K530'; -soundex (Lloyd) == soundex (Ladd) == 'L300'; -soundex (Lukasiewicz) == soundex (Lissajous) == 'L222'; +soundex(Euler) == soundex(Ellery) == 'E460'; +soundex(Gauss) == soundex(Ghosh) == 'G200'; +soundex(Hilbert) ==
Re: [PHP-DOC] cvs: phpdoc /en/functions strings.xml
Please don't use tabs, but only spaces for indentation. I'm sorry, I didn't know vim used tabs automatically... :set et sw=1 ts=1 seems to fix that. Anyone knows of an option to visualise the tabs? Not :set list, since it renders the ts useless. It'll be reverted on my next commit. Jeroen
[PHP-DOC] cvs: phpdoc /en/functions strings.xml
jeroen Thu Jun 28 19:03:47 2001 EDT Modified files: /phpdoc/en/functionsstrings.xml Log: Fixed tabs to spaces.
Re: [PHP-DOC] cvs: phpdoc /en/functions strings.xml
On Thu, 28 Jun 2001, Jeroen van Wolffelaar wrote: Please don't use tabs, but only spaces for indentation. I'm sorry, I didn't know vim used tabs automatically... :set et sw=1 ts=1 seems to fix that. Anyone knows of an option to visualise the tabs? Not :set list, since it renders the ts useless. /\t will search for tabs, and if you set this option in your .vimrc all occurences will be displayed too: :set hlsearch :highlight Search ctermfg=1 ctermbg=7 It may be possible to set these options too( but before the other 2 above): :if has(terminfo) : set t_Co=8 : set t_Sf=^[[3%p1%dm : set t_Sb=^[[4%p1%dm :else : set t_Co=8 : set t_Sf=^[[3%dm : set t_Sb=^[[4%dm :endif regards, Derick
Re: [PHP-DOC] cvs: phpdoc /en/functions strings.xml
On Wed, 27 Jun 2001, Jeroen van Wolffelaar wrote: Implemented zak's notes on addcslashes + /para + para + Be careful if you choose to escape characters 0, a, b, f, n, r, Please don't use tabs, but only spaces for indentation. Derick
[PHP-DOC] cvs: phpdoc /en/functions strings.xml
damsWed May 23 05:01:53 2001 EDT Modified files: /phpdoc/en/functionsstrings.xml Log: Added funcprototype to rtrim Index: phpdoc/en/functions/strings.xml diff -u phpdoc/en/functions/strings.xml:1.90 phpdoc/en/functions/strings.xml:1.91 --- phpdoc/en/functions/strings.xml:1.90Tue May 22 15:52:58 2001 +++ phpdoc/en/functions/strings.xml Wed May 23 05:01:52 2001 @@ -1585,8 +1585,10 @@ refsect1 titleDescription/title funcsynopsis - funcdefstring functionrtrim/function/funcdef - paramdefstring parameterstr/parameter/paramdef + funcprototype + funcdefstring functionrtrim/function/funcdef + paramdefstring parameterstr/parameter/paramdef + /funcprototype /funcsynopsis para Returns the argument string without trailing whitespace,
[PHP-DOC] cvs: phpdoc /en/functions strings.xml
sniper Tue May 22 15:52:59 2001 EDT Modified files: /phpdoc/en/functionsstrings.xml Log: fixed typo Index: phpdoc/en/functions/strings.xml diff -u phpdoc/en/functions/strings.xml:1.89 phpdoc/en/functions/strings.xml:1.90 --- phpdoc/en/functions/strings.xml:1.89Tue May 22 09:11:30 2001 +++ phpdoc/en/functions/strings.xml Tue May 22 15:52:58 2001 @@ -1392,7 +1392,7 @@ note para Starting with PHP 4.0.5, functionnl2br/function is now XHTML - complaint. All versions before 4.0.5 will return + compliant. All versions before 4.0.5 will return parameterstring/parameter with 'lt;brgt;' inserted before newlines instead of 'lt;br /gt;'. /para
[PHP-DOC] cvs: phpdoc /en/functions strings.xml
damsMon May 21 10:56:07 2001 EDT Modified files: /phpdoc/en/functionsstrings.xml Log: Adding zak's note Index: phpdoc/en/functions/strings.xml diff -u phpdoc/en/functions/strings.xml:1.87 phpdoc/en/functions/strings.xml:1.88 --- phpdoc/en/functions/strings.xml:1.87Sat May 19 17:50:14 2001 +++ phpdoc/en/functions/strings.xml Mon May 21 10:56:06 2001 @@ -570,6 +570,11 @@ If parameterlimit/parameter is set, the returned array will contain a maximum of parameterlimit/parameter elements with the last element containing the whole rest of parameterstring/parameter. + If an empty string () is used as the parameterseparator/parameter + argument, then functionexplode/function will return literalFALSE/literal. + If parameterseparator/parameter contains a value that is not contained in + the parameterstring/parameter argument, thenfunctionexplode/function + will return the parameterstring/parameter argument. /para note para
[PHP-DOC] cvs: phpdoc /en/functions strings.xml
hholzgraWed May 2 07:11:06 2001 EDT Modified files: /phpdoc/en/functionsstrings.xml Log: reverting yesterdays accitential commit Index: phpdoc/en/functions/strings.xml diff -u phpdoc/en/functions/strings.xml:1.85 phpdoc/en/functions/strings.xml:1.86 --- phpdoc/en/functions/strings.xml:1.85Tue May 1 09:20:51 2001 +++ phpdoc/en/functions/strings.xml Wed May 2 07:11:06 2001 @@ -3426,27 +3426,15 @@ /funcprototype /funcsynopsis para - strings.xml - strings.xml - Capitalizes the first character of each word in -parameterstr/parameter if that character is alphabetic. A -word is defined as any sequence of non-whitespace letters (of the -current locale) immediately following a whitespace (space, -horizontal or vertical tab, linefeed or carriage return). -=== - Retuns a string with the first character of each word in -=== Returns a string with the first character of each word in - 1.83 parameterstr/parameter capitalized, if that character is alphabetic. - 1.77 example titlefunctionucwords/function example/title programlisting role=php -$text = mary had a little lamb and she loved it so.; $text = -ucwords($text); // $text is now: Mary Had A Little // Lamb And -She Loved It So. +$text = mary had a little lamb and she loved it so.; +$text = ucwords($text); // $text is now: Mary Had A Little +// Lamb And She Loved It So. /programlisting /example note
[PHP-DOC] cvs: phpdoc /en/functions strings.xml
damsTue Apr 24 00:27:02 2001 EDT Modified files: /phpdoc/en/functionsstrings.xml Log: Added new behaviour of nl2br() Index: phpdoc/en/functions/strings.xml diff -u phpdoc/en/functions/strings.xml:1.83 phpdoc/en/functions/strings.xml:1.84 --- phpdoc/en/functions/strings.xml:1.83Sun Apr 15 10:23:21 2001 +++ phpdoc/en/functions/strings.xml Tue Apr 24 00:27:01 2001 @@ -1385,6 +1385,11 @@ before all newlines. /para para + Until PHP 4.0.5, functionnl2br/function will return + parameterstring/parameter with 'lt;brgt;' inserted + before all newlines. +/para +para See also functionhtmlspecialchars/function, functionhtmlentities/function and functionwordwrap/function.
[PHP-DOC] cvs: phpdoc /en/functions strings.xml
avsmSun Apr 15 10:23:21 2001 EDT Modified files: /phpdoc/en/functionsstrings.xml Log: Fix typos Index: phpdoc/en/functions/strings.xml diff -u phpdoc/en/functions/strings.xml:1.82 phpdoc/en/functions/strings.xml:1.83 --- phpdoc/en/functions/strings.xml:1.82Sun Apr 15 10:16:47 2001 +++ phpdoc/en/functions/strings.xml Sun Apr 15 10:23:21 2001 @@ -292,7 +292,7 @@ refnamediv refnamecount_chars/refname refpurpose - Return information abouts characters used in a string + Return information about characters used in a string /refpurpose /refnamediv refsect1 @@ -309,7 +309,7 @@ /funcprototype /funcsynopsis para - Counts the number of occurances of every byte-value (0..255) in + Counts the number of occurrences of every byte-value (0..255) in parameterstring/parameter and returns it in various ways. The optional parameter parameterMode/parameter default to 0. Depending on parametermode/parameter @@ -317,7 +317,7 @@ itemizedlist listitem simpara - 0 - an array with the byte-value as key and the freqency of + 0 - an array with the byte-value as key and the frequency of every byte as value. /simpara /listitem @@ -369,7 +369,7 @@ para Generates the cyclic redundancy checksum polynomial of 32-bit lengths of the parameterstr/parameter. This is usually used to validate the -integrity of data being trasmited. +integrity of data being transmitted. /para para See also: functionmd5/function @@ -488,7 +488,7 @@ /simpara para functionEcho/function is not actually a function (it is a - language construct) so you are not required to use parantheses + language construct) so you are not required to use parentheses with it. In fact, if you want to pass more than one parameter to echo, you must not enclose the parameters within parentheses. example @@ -567,7 +567,7 @@ Returns an array of strings, each of which is a substring of parameterstring/parameter formed by splitting it on boundaries formed by the string parameterdelim/parameter. - If parameterlimit/parameter is set, the returned array will contaion + If parameterlimit/parameter is set, the returned array will contain a maximum of parameterlimit/parameter elements with the last element containing the whole rest of parameterstring/parameter. /para @@ -1018,7 +1018,7 @@ but still expensive). /para para -In its simpelest form the function will take only the two +In its simplest form the function will take only the two strings as parameter and will calculate just the number of insert, replace and delete operations needed to transform parameterstr1/parameter into parameterstr2/parameter. @@ -1152,7 +1152,7 @@ /row row entrymon_thousands_sep/entry -entryMonetary thousands seperator/entry +entryMonetary thousands separator/entry /row row entrymon_grouping/entry @@ -1180,7 +1180,7 @@ /row row entryp_sep_by_space/entry -entryTrue if a space seperates currency_symbol from a positive value, false otherwise/entry +entryTrue if a space separates currency_symbol from a positive value, false +otherwise/entry /row row entryn_cs_precedes/entry @@ -1188,7 +1188,7 @@ /row row entryn_sep_by_space/entry -entryTrue if a space seperates currency_symbol from a negative value, false otherwise/entry +entryTrue if a space separates currency_symbol from a negative value, false +otherwise/entry /row row valign="top" entryp_sign_posn/entry @@ -1711,7 +1711,7 @@ /para para Setlocale returns the new current locale, or false if the locale - functionality is not implemented in the plattform, the specified + functionality is not implemented in the platform, the specified locale does not exist or the category name is invalid. An invalid category name also causes a warning message. /para @@ -2393,7 +2393,7 @@ ) /programlisting /informalexample -For more infomation see: Martin Pool's ulink +For more information see: Martin Pool's ulink url="url.strnatcmp;"Natural Order String Comparison/ulink page. /para @@ -2437,7 +2437,7 @@ para This function implements a comparison algorithm that orders alphanumeric strings in the way a human being would. The -behavior of this function is similar to +behaviour of this function is similar to functionstrnatcmp/function, except that the comparison is not case sensitive. For more infomation see:
[PHP-DOC] cvs: phpdoc /en/functions strings.xml
sniper Sat Mar 10 10:51:47 2001 EDT Modified files: /phpdoc/en/functionsstrings.xml Log: Setlocale uses constants now. +ws fix Index: phpdoc/en/functions/strings.xml diff -u phpdoc/en/functions/strings.xml:1.77 phpdoc/en/functions/strings.xml:1.78 --- phpdoc/en/functions/strings.xml:1.77Sat Feb 24 19:05:49 2001 +++ phpdoc/en/functions/strings.xml Sat Mar 10 10:51:47 2001 @@ -1630,44 +1630,43 @@ funcsynopsis funcprototype funcdefstring functionsetlocale/function/funcdef - paramdefstring parametercategory/parameter/paramdef + paramdefmixed parametercategory/parameter/paramdef paramdefstring parameterlocale/parameter/paramdef /funcprototype /funcsynopsis para - parameterCategory/parameter is a string specifying the - category of the functions affected by the locale setting: + parameterCategory/parameter is a named constant (or string) + specifying the category of the functions affected by the locale setting: itemizedlist listitem simpara - LC_ALL for all of the below +LC_ALL for all of the below /simpara /listitem listitem simpara - LC_COLLATE for string comparison, see functionstrcoll/function +LC_COLLATE for string comparison, see functionstrcoll/function /simpara /listitem listitem simpara - LC_CTYPE for character classification and conversion, for - example functionstrtoupper/function +LC_CTYPE for character classification and conversion, for +example functionstrtoupper/function /simpara /listitem listitem simpara - LC_MONETARY for functionlocaleconv/function +LC_MONETARY for functionlocaleconv/function /simpara /listitem listitem simpara - LC_NUMERIC for decimal separator (See also: functionlocaleconv/function) +LC_NUMERIC for decimal separator (See also: functionlocaleconv/function) /simpara /listitem listitem simpara - LC_TIME for date and time formatting with - functionstrftime/function +LC_TIME for date and time formatting with functionstrftime/function /simpara /listitem /itemizedlist
[PHP-DOC] cvs: phpdoc /en/functions strings.xml
ronabop Sat Feb 24 18:38:53 2001 EDT Modified files: /phpdoc/en/functionsstrings.xml Log: Clarifying function returns. Index: phpdoc/en/functions/strings.xml diff -u phpdoc/en/functions/strings.xml:1.75 phpdoc/en/functions/strings.xml:1.76 --- phpdoc/en/functions/strings.xml:1.75Fri Feb 23 07:35:46 2001 +++ phpdoc/en/functions/strings.xml Sat Feb 24 18:38:53 2001 @@ -247,7 +247,7 @@ /funcprototype /funcsynopsis para - This function converts the given string from one Cyrillic + This function returns the given string from one Cyrillic character set to another. The parameterfrom/parameter and parameterto/parameter arguments are single characters that represent the source and target Cyrillic character sets. The @@ -394,7 +394,7 @@ /funcprototype /funcsynopsis para - functioncrypt/function will encrypt a string using the + functioncrypt/function will return an encrypted string using the standard Unix abbrevDES/abbrev encryption method. Arguments are a string to be encrypted and an optional two-character salt string to base the encryption on. See the Unix man page for your @@ -952,7 +952,7 @@ titleDescription/title funcsynopsis funcprototype - funcdefint functionlevenshtein/function/funcdef + funcdefint functionlevenshtein/function/funcdef paramdefstring parameterstr1/parameter/paramdef paramdefstring parameterstr2/parameter/paramdef /funcprototype @@ -972,10 +972,10 @@ /funcprototype /funcsynopsis para -This function returns the Levenshtein-Distance between the + This function returns the Levenshtein-Distance between the two argument strings or -1, if one of the argument strings is longer than the limit of 255 characters (255 should be -more than enough for name or dictionary comparison, and + more than enough for name or dictionary comparison, and nobody serious would be doing genetic analysis with PHP). /para para @@ -1266,8 +1266,8 @@ /funcprototype /funcsynopsis para - This function strips whitespace from the start of a string and - returns the stripped string. The whitespace + This function returns a string with whitespace stripped from the + beginning of parameterstr/parameter. The whitespace characters it currently strips are: "\n", "\r", "\t", "\v", "\0", and a plain space. /para @@ -1294,7 +1294,7 @@ para Calculates the MD5 hash of parameterstr/parameter using the ulink url="url.rfc;rfc1321.html"RSA Data Security, Inc. - MD5 Message-Digest Algorithm/ulink. + MD5 Message-Digest Algorithm/ulink, and returns that hash. /para para See also: functioncrc32/function @@ -1476,8 +1476,8 @@ /simpara simpara See also: functionprint/function, functionsprintf/function, -functionsscanf/function, functionfscanf/function, -and functionflush/function. + functionsscanf/function, functionfscanf/function, + and functionflush/function. /simpara /refsect1 /refentry @@ -2136,8 +2136,9 @@ /funcprototype /funcsynopsis para - This function tries to strip all HTML and PHP tags from the given - string. It errors on the side of caution in case of incomplete + This function tries to return a string with all HTML and PHP + tags stripped from a given parameterstr/parameter, + It errors on the side of caution in case of incomplete or bogus tags. It uses the same tag stripping state machine as the functionfgetss/function function. /para @@ -2453,9 +2454,9 @@ /funcprototype /funcsynopsis para - This functions pads the parameterinput/parameter string on - the left, the right, or both sides to the specifed padding - length. If the optional argument + This functions returns the parameterinput/parameter string + padded on the left, the right, or both sides to the specifed + padding length. If the optional argument parameterpad_string/parameter is not supplied, the parameterinput/parameter is padded with spaces, otherwise it is padded with characters from parameterpad_string/parameter @@ -2944,7 +2945,7 @@ refnamediv refnamestr_replace/refname refpurpose - Replace all occurrences of the search string in subject with the replacement string + Replace all occurrences of the search string with the replacement string /refpurpose /refnamediv refsect1 @@ -2958,19 +2959,20 @@ /funcprototype /funcsynopsis para - This function replaces all occurences of parametersearch/parameter in - parametersubject/parameter with the given - parameterreplace/parameter value. If you don't need fancy
[PHP-DOC] cvs: phpdoc /en/functions strings.xml
ronabop Sat Feb 24 19:05:49 2001 EDT Modified files: /phpdoc/en/functionsstrings.xml Log: Typos. Index: phpdoc/en/functions/strings.xml diff -u phpdoc/en/functions/strings.xml:1.76 phpdoc/en/functions/strings.xml:1.77 --- phpdoc/en/functions/strings.xml:1.76Sat Feb 24 18:38:53 2001 +++ phpdoc/en/functions/strings.xml Sat Feb 24 19:05:49 2001 @@ -247,9 +247,9 @@ /funcprototype /funcsynopsis para - This function returns the given string from one Cyrillic - character set to another. The parameterfrom/parameter and - parameterto/parameter arguments are single characters that + This function returns the given string converted from one + Cyrillic character set to another. The parameterfrom/parameter + and parameterto/parameter arguments are single characters that represent the source and target Cyrillic character sets. The supported types are: itemizedlist @@ -2137,7 +2137,7 @@ /funcsynopsis para This function tries to return a string with all HTML and PHP - tags stripped from a given parameterstr/parameter, + tags stripped from a given parameterstr/parameter. It errors on the side of caution in case of incomplete or bogus tags. It uses the same tag stripping state machine as the functionfgetss/function function. @@ -3312,7 +3312,7 @@ /funcprototype /funcsynopsis para - Retuns a string with the first character of + Returns a string with the first character of parameterstr/parameter capitalized, if that character is alphabetic. /para
[PHP-DOC] cvs: phpdoc /en/functions strings.xml
sas Fri Feb 23 07:35:46 2001 EDT Modified files: /phpdoc/en/functionsstrings.xml Log: reflect that nl2br has been changed to conform to xhtml 1.0. Index: phpdoc/en/functions/strings.xml diff -u phpdoc/en/functions/strings.xml:1.74 phpdoc/en/functions/strings.xml:1.75 --- phpdoc/en/functions/strings.xml:1.74Thu Feb 22 16:05:34 2001 +++ phpdoc/en/functions/strings.xml Fri Feb 23 07:35:46 2001 @@ -1353,7 +1353,7 @@ /funcprototype /funcsynopsis para - Returns parameterstring/parameter with 'lt;BRgt;' inserted + Returns parameterstring/parameter with 'lt;br /gt;' inserted before all newlines. /para para
[PHP-DOC] cvs: phpdoc /en/functions strings.xml
torben Thu Feb 22 16:05:35 2001 EDT Modified files: /phpdoc/en/functionsstrings.xml Log: Clarified nl2br() refpurpose. Index: phpdoc/en/functions/strings.xml diff -u phpdoc/en/functions/strings.xml:1.73 phpdoc/en/functions/strings.xml:1.74 --- phpdoc/en/functions/strings.xml:1.73Thu Feb 8 02:27:59 2001 +++ phpdoc/en/functions/strings.xml Thu Feb 22 16:05:34 2001 @@ -1342,7 +1342,7 @@ refentry id="function.nl2br" refnamediv refnamenl2br/refname -refpurposeConverts newlines to HTML line breaks/refpurpose +refpurposeInserts HTML line breaks before all newlines in a string/refpurpose /refnamediv refsect1 titleDescription/title
[PHP-DOC] cvs: phpdoc /en/functions strings.xml
elixer Sat Jan 20 11:15:05 2001 EDT Modified files: /phpdoc/en/functionsstrings.xml Log: Update setlocale() to reflect the addition of strcoll() Index: phpdoc/en/functions/strings.xml diff -u phpdoc/en/functions/strings.xml:1.69 phpdoc/en/functions/strings.xml:1.70 --- phpdoc/en/functions/strings.xml:1.69Sat Jan 20 11:12:53 2001 +++ phpdoc/en/functions/strings.xml Sat Jan 20 11:15:05 2001 @@ -1645,7 +1645,7 @@ /listitem listitem simpara - LC_COLLATE for string comparison - not currently implemented in PHP + LC_COLLATE for string comparison, see functionstrcoll/function /simpara /listitem listitem