CVS update: php3/doc/functions
| From: | rasmus | Date: | Thu, 17 Dec 1998 16:22:04 +0000 |
| Subject: | CVS update: php3/doc/functions | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-2829@lists.php.net to get a copy of this message | ||
Date: Thursday December 17, 1998 @ 11:22
Author: rasmus
Update of /repository/php3/doc/functions
In directory asf:/home/rasmus/php3/doc/functions
Modified Files:
strings.sgml
Log Message:
Add chr_replace() function
Index: php3/doc/functions/strings.sgml
diff -c php3/doc/functions/strings.sgml:1.45 php3/doc/functions/strings.sgml:1.46
*** php3/doc/functions/strings.sgml:1.45 Wed Dec 9 21:07:41 1998
--- php3/doc/functions/strings.sgml Thu Dec 17 11:22:04 1998
***************
*** 88,93 ****
--- 88,122 ----
</refsect1>
</refentry>
+ <refentry id="function.chr_replace">
+ <refnamediv>
+ <refname>Chr</refname>
+ <refpurpose>Find all occurrences of char in str and replace with repl</refpurpose>
+ </refnamediv>
+ <refsect1>
+ <title>Description</title>
+ <funcsynopsis>
+ <funcdef>string <function>chr_replace</function></funcdef>
+ <paramdef>string <parameter>char</parameter></paramdef>
+ <paramdef>string <parameter>repl</parameter></paramdef>
+ <paramdef>string <parameter>str</parameter></paramdef>
+ </funcsynopsis>
+ <para>
+ Searches <parameter>str</parameter> for all occurrences of
<parameter>char</parameter>
+ and replaces it with <parameter>repl</parameter>. Note that this function does
not do
+ in-place replacement. It returns the new string leaving the original string untouched.
+ <example>
+ <title>chr_replace() example</title>
+ <programlisting>
+ $new_string .= chr_replace("\n", "\r\n", $old_string)
+ </programlisting></example>
+
+ This function is significantly faster than <function>ereg_replace</function> and
should be
+ used when a simple single character needs to be replaced with one or more others.
+
+ </refsect1>
+ </refentry>
+
<refentry id="function.convert-cyr-string">
<refnamediv>
<refname>convert_cyr_string</refname>
--
PHP Development Mailing List http://www.php.net/
To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net
For help: php-dev-help@lists.php.net