reference/strings/functions/strnatcasecmp.xml
a3573c18b89fd32aca1c3924d3fd9568900b4a33
...
...
@@ -10,8 +10,8 @@
10
10
&reftitle.description;
11
11
<methodsynopsis>
12
12
<type>int</type><methodname>strnatcasecmp</methodname>
13
-
<methodparam><type>string</type><parameter>str1</parameter></methodparam>
14
-
<methodparam><type>string</type><parameter>str2</parameter></methodparam>
13
+
<methodparam><type>string</type><parameter>string1</parameter></methodparam>
14
+
<methodparam><type>string</type><parameter>string2</parameter></methodparam>
15
15
</methodsynopsis>
16
16
<para>
17
17
This function implements a comparison algorithm that orders alphanumeric
...
...
@@ -27,7 +27,7 @@
27
27
<para>
28
28
<variablelist>
29
29
<varlistentry>
30
-
<term><parameter>str1</parameter></term>
30
+
<term><parameter>string1</parameter></term>
31
31
<listitem>
32
32
<para>
33
33
The first string.
...
...
@@ -35,7 +35,7 @@
35
35
</listitem>
36
36
</varlistentry>
37
37
<varlistentry>
38
-
<term><parameter>str2</parameter></term>
38
+
<term><parameter>string2</parameter></term>
39
39
<listitem>
40
40
<para>
41
41
The second string.
...
...
@@ -49,10 +49,54 @@
49
49
<refsect1 role="returnvalues">
50
50
&reftitle.returnvalues;
51
51
<para>
52
-
Similar to other string comparison functions, this one returns &lt; 0 if
53
-
<parameter>str1</parameter> is less than <parameter>str2</parameter> &gt;
54
-
0 if <parameter>str1</parameter> is greater than
55
-
<parameter>str2</parameter>, and 0 if they are equal.
52
+
Similar to other string comparison functions, this one returns <literal>-1</literal> if
53
+
<parameter>string1</parameter> is less than <parameter>string2</parameter>
54
+
<literal>1</literal> if <parameter>string1</parameter> is greater than
55
+
<parameter>string2</parameter>, and <literal>0</literal> if they are equal.
56
+
</para>
57
+
</refsect1>
58
+

59
+
<refsect1 role="changelog">
60
+
&reftitle.changelog;
61
+
<informaltable>
62
+
<tgroup cols="2">
63
+
<thead>
64
+
<row>
65
+
<entry>&Version;</entry>
66
+
<entry>&Description;</entry>
67
+
</row>
68
+
</thead>
69
+
<tbody>
70
+
&standard.changelog.binary-safe-string-comparison;
71
+
</tbody>
72
+
</tgroup>
73
+
</informaltable>
74
+
</refsect1>
75
+

76
+
<refsect1 role="examples">
77
+
&reftitle.examples;
78
+
<para>
79
+
<example>
80
+
<title><function>strnatcasecmp</function> example</title>
81
+
<programlisting role="php">
82
+
<![CDATA[
83
+
<?php
84
+

85
+
var_dump(strnatcasecmp('Apple', 'Banana'));
86
+
var_dump(strnatcasecmp('Banana', 'Apple'));
87
+
var_dump(strnatcasecmp('apple', 'Apple'));
88
+
?>
89
+
]]>
90
+
</programlisting>
91
+
&example.outputs;
92
+
<screen>
93
+
<![CDATA[
94
+
int(-1)
95
+
int(1)
96
+
int(0)
97
+
]]>
98
+
</screen>
99
+
</example>
56
100
</para>
57
101
</refsect1>
58
102

...
...
@@ -74,7 +118,6 @@
74
118
</refsect1>
75
119

76
120
</refentry>
77
-

78
121
<!-- Keep this comment at the end of the file
79
122
Local variables:
80
123
mode: sgml
81
124