CVS update: php3/doc/functions
| From: | rasmus | Date: | Sun, 20 Dec 1998 15:43:59 +0000 |
| Subject: | CVS update: php3/doc/functions | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-2909@lists.php.net to get a copy of this message | ||
Date: Sunday December 20, 1998 @ 10:43
Author: rasmus
Update of /repository/php3/doc/functions
In directory asf:/home/rasmus/php3/doc/functions
Modified Files:
strings.sgml
Log Message:
Get rid of chr_replace() and let str_replace() be the single unified
interface to this functionality.
Index: php3/doc/functions/strings.sgml
diff -c php3/doc/functions/strings.sgml:1.51 php3/doc/functions/strings.sgml:1.52
*** php3/doc/functions/strings.sgml:1.51 Sun Dec 20 05:21:01 1998
--- php3/doc/functions/strings.sgml Sun Dec 20 10:43:58 1998
***************
*** 88,129 ****
</refsect1>
</refentry>
- <refentry id="function.chr-replace">
- <refnamediv>
- <refname>chr_replace</refname>
- <refpurpose>Find all occurrences of needle in haystack and replace it with
str</refpurpose>
- </refnamediv>
- <refsect1>
- <title>Description</title>
- <funcsynopsis>
- <funcdef>string <function>chr_replace</function></funcdef>
- <paramdef>string <parameter>needle</parameter></paramdef>
- <paramdef>string <parameter>str</parameter></paramdef>
- <paramdef>string <parameter>haystack</parameter></paramdef>
- </funcsynopsis>
- <para>
- Searches <parameter>haystack</parameter> for all occurrences of
- <parameter>needle</parameter> and replaces it with
- <parameter>str</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.
-
- <para>
- See also:
-
- <function>str_replace</function>
-
- </refsect1>
- </refentry>
-
<refentry id="function.chunk-split">
<refnamediv>
<refname>chunk_split</refname>
--- 88,93 ----
***************
*** 1375,1381 ****
<refentry id="function.str-replace">
<refnamediv>
<refname>str_replace</refname>
! <refpurpose>Replaces all occurences of needle in haystack with str</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
--- 1339,1345 ----
<refentry id="function.str-replace">
<refnamediv>
<refname>str_replace</refname>
! <refpurpose>Replace all occurrences of needle in haystack with str</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
--
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