1
0
mirror of https://github.com/php/doc-ja.git synced 2026-03-30 02:52:08 +02:00
Files
archived-doc-ja/reference/array/functions/natcasesort.xml
Hideyuki Shimooka 25e22b0ac8 Translation updated
git-svn-id: https://svn.php.net/repository/phpdoc/ja/trunk@185760 c90b9560-bf6c-de11-be94-00142212c4b1
2005-05-04 03:37:38 +00:00

107 lines
2.8 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision: 1.5 $ -->
<!-- splitted from ./ja/functions/array.xml, last change in rev 1.11 -->
<!-- EN-Revision: 1.9 Maintainer: hirokawa Status: ready -->
<!-- CREDITS: shimooka -->
<refentry id="function.natcasesort">
<refnamediv>
<refname>natcasesort</refname>
<refpurpose>
大文字小文字を区別しない"自然順"アルゴリズムを用いて配列をソートする
</refpurpose>
</refnamediv>
<refsect1>
<title>説明</title>
<methodsynopsis>
<type>bool</type><methodname>natcasesort</methodname>
<methodparam><type>array</type><parameter role="reference">array</parameter></methodparam>
</methodsynopsis>
<para>
この関数は、人間が行うような手法でアルファベットまたは数字の文字
列の順番をキー/値の関係を保持したままソートします。
これは、"自然順(natural ordering)"と呼ばれているものです。
</para>
<para>
<function>natcasesort</function> は、大文字小文字を区別しないバー
ジョンの<function>natsort</function>です。
</para>
<para>
<example>
<title><function>natcasesort</function> の例</title>
<programlisting role="php">
<![CDATA[
<?php
$array1 = $array2 = array('IMG0.png', 'img12.png', 'img10.png', 'img2.png', 'img1.png', 'IMG3.png');
sort($array1);
echo "Standard sorting\n";
print_r($array1);
natcasesort($array2);
echo "\nNatural order sorting (case-insensitive)\n";
print_r($array2);
?>
]]>
</programlisting>
&example.outputs;
<screen>
<![CDATA[
Standard sorting
Array
(
[0] => IMG0.png
[1] => IMG3.png
[2] => img1.png
[3] => img10.png
[4] => img12.png
[5] => img2.png
)
Natural order sorting (case-insensitive)
Array
(
[0] => IMG0.png
[4] => img1.png
[3] => img2.png
[5] => IMG3.png
[2] => img10.png
[1] => img12.png
)
]]>
</screen>
<para>
より詳細な情報については、Martin Poolの<ulink
url="&url.strnatcmp;">Natural Order String Comparison</ulink>
ページを参照ください。
</para>
</example>
</para>
<para>
<function>sort</function>,<function>natsort</function>,
<function>strnatcmp</function>,<function>strnatcasecmp</function>
も参照ください。
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->