mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
new fiunction count_chars()
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@17180 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
2a56b4f1b9
commit
52d5d29b8d
1 changed files with 46 additions and 1 deletions
|
@ -150,7 +150,7 @@ $str = sprintf("The string ends in escape: %c", 27);
|
|||
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
|
||||
<refentry id="function.chunk-split">
|
||||
<refnamediv>
|
||||
<refname>chunk_split</refname>
|
||||
|
@ -230,6 +230,51 @@ $new_string = chunk_split(base64_encode($data));
|
|||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
|
||||
<refentry id="function.count_chars">
|
||||
<refnamediv>
|
||||
<refname>count_chars</refname>
|
||||
<refpurpose>Return information abouts characters used in a string</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<funcsynopsis>
|
||||
<funcdef>mixed <function>count_chars</function></funcdef>
|
||||
<paramdef>string <parameter>string</parameter></paramdef>
|
||||
<parameter><optional>mode</optional></parameter>
|
||||
</funcsynopsis>
|
||||
<para>
|
||||
Counts the number of occurances of every byte-value (0..255) in
|
||||
<parameter>string</parameter> and returns it in various ways.
|
||||
The optional parameter <parameter>Mode</parameter> default to 0. Depending on
|
||||
<parameter>mode</parameter> <function>count_chars</function> returns one of the following:
|
||||
<itemizedlist>
|
||||
<listitem><simpara>
|
||||
0 - an array with the byte-value as key and the freqency of every byte as value.
|
||||
</simpara></listitem>
|
||||
<listitem><simpara>
|
||||
1 - same as 0 but only byte-values with a frequency greater zero are listed.
|
||||
</simpara></listitem>
|
||||
<listitem><simpara>
|
||||
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.
|
||||
</simpara></listitem>
|
||||
<listitem><simpara>
|
||||
4 - a string containing all not used byte-values is returned.
|
||||
</simpara></listitem>
|
||||
</itemizedlist></para>
|
||||
|
||||
<note>
|
||||
<para>
|
||||
This function was added in PHP 4.0.
|
||||
</para>
|
||||
</note>
|
||||
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<refentry id="function.crypt">
|
||||
<refnamediv>
|
||||
<refname>crypt</refname>
|
||||
|
|
Loading…
Reference in a new issue