mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
Fix doc bug #51858 (mb_convert_case example is not the best) by adding some
examples to the manual pages for mb_convert_case, mb_strtoupper and mb_strtolower that use multi-byte characters (specifically Greek). git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@299482 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
75d748890a
commit
35db4c5185
3 changed files with 47 additions and 0 deletions
|
@ -91,6 +91,23 @@ echo $str; // Prints MARY HAD A LITTLE LAMB AND SHE LOVED IT SO
|
|||
$str = mb_convert_case($str, MB_CASE_TITLE, "UTF-8");
|
||||
echo $str; // Prints Mary Had A Little Lamb And She Loved It So
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
<example>
|
||||
<title><function>mb_convert_case</function> example with non-Latin UTF-8 text</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$str = "Τάχιστη αλώπηξ βαφής ψημένη γη, δρασκελίζει υπέρ νωθρού κυνός";
|
||||
$str = mb_convert_case($str, MB_CASE_UPPER, "UTF-8");
|
||||
echo $str; // Prints ΤΆΧΙΣΤΗ ΑΛΏΠΗΞ ΒΑΦΉΣ ΨΗΜΈΝΗ ΓΗ, ΔΡΑΣΚΕΛΊΖΕΙ ΥΠΈΡ ΝΩΘΡΟΎ ΚΥΝΌΣ
|
||||
$str = mb_convert_case($str, MB_CASE_TITLE, "UTF-8");
|
||||
echo $str; // Prints Τάχιστη Αλώπηξ Βαφήσ Ψημένη Γη, Δρασκελίζει Υπέρ Νωθρού Κυνόσ
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
|
|
|
@ -74,6 +74,21 @@ $str = "Mary Had A Little Lamb and She LOVED It So";
|
|||
$str = mb_strtolower($str);
|
||||
echo $str; // Prints mary had a little lamb and she loved it so
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
<example>
|
||||
<title><function>mb_strtolower</function> example with non-Latin UTF-8 text</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$str = "Τάχιστη αλώπηξ βαφής ψημένη γη, δρασκελίζει υπέρ νωθρού κυνός";
|
||||
$str = mb_strtolower($str, 'UTF-8');
|
||||
echo $str; // Prints τάχιστη αλώπηξ βαφής ψημένη γη, δρασκελίζει υπέρ νωθρού κυνός
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
|
|
|
@ -74,6 +74,21 @@ $str = "Mary Had A Little Lamb and She LOVED It So";
|
|||
$str = mb_strtoupper($str);
|
||||
echo $str; // Prints MARY HAD A LITTLE LAMB AND SHE LOVED IT SO
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
<example>
|
||||
<title><function>mb_strtoupper</function> example with non-Latin UTF-8 text</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$str = "Τάχιστη αλώπηξ βαφής ψημένη γη, δρασκελίζει υπέρ νωθρού κυνός";
|
||||
$str = mb_strtoupper($str, 'UTF-8');
|
||||
echo $str; // Prints ΤΆΧΙΣΤΗ ΑΛΏΠΗΞ ΒΑΦΉΣ ΨΗΜΈΝΗ ΓΗ, ΔΡΑΣΚΕΛΊΖΕΙ ΥΠΈΡ ΝΩΘΡΟΎ ΚΥΝΌΣ
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
|
|
Loading…
Reference in a new issue