reference/strings/functions/strcasecmp.xml
a3573c18b89fd32aca1c3924d3fd9568900b4a33
...
...
@@ -1,6 +1,6 @@
1
1
<?xml version="1.0" encoding="utf-8"?>
2
2
<!-- $Revision$ -->
3
-
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.strcasecmp">
3
+
<refentry xml:id="function.strcasecmp" xmlns="http://docbook.org/ns/docbook">
4
4
<refnamediv>
5
5
<refname>strcasecmp</refname>
6
6
<refpurpose>Binary safe case-insensitive string comparison</refpurpose>
...
...
@@ -10,11 +10,13 @@
10
10
&reftitle.description;
11
11
<methodsynopsis>
12
12
<type>int</type><methodname>strcasecmp</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
Binary safe case-insensitive string comparison.
18
+
The comparison is not locale aware; only ASCII letters are compared in a
19
+
case-insensitive way.
18
20
</para>
19
21
</refsect1>
20
22

...
...
@@ -23,7 +25,7 @@
23
25
<para>
24
26
<variablelist>
25
27
<varlistentry>
26
-
<term><parameter>str1</parameter></term>
28
+
<term><parameter>string1</parameter></term>
27
29
<listitem>
28
30
<para>
29
31
The first string
...
...
@@ -31,7 +33,7 @@
31
33
</listitem>
32
34
</varlistentry>
33
35
<varlistentry>
34
-
<term><parameter>str2</parameter></term>
36
+
<term><parameter>string2</parameter></term>
35
37
<listitem>
36
38
<para>
37
39
The second string
...
...
@@ -45,13 +47,30 @@
45
47
<refsect1 role="returnvalues">
46
48
&reftitle.returnvalues;
47
49
<para>
48
-
Returns &lt; 0 if <parameter>str1</parameter> is less than
49
-
<parameter>str2</parameter>; &gt; 0 if <parameter>str1</parameter>
50
-
is greater than <parameter>str2</parameter>, and 0 if they are
50
+
Returns <literal>-1</literal> if <parameter>string1</parameter> is less than
51
+
<parameter>string2</parameter>; <literal>1</literal> if <parameter>string1</parameter>
52
+
is greater than <parameter>string2</parameter>, and <literal>0</literal> if they are
51
53
equal.
52
54
</para>
53
55
</refsect1>
54
56

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

55
74
<refsect1 role="examples">
56
75
&reftitle.examples;
57
76
<para>
...
...
@@ -87,7 +106,6 @@ if (strcasecmp($var1, $var2) == 0) {
87
106
</refsect1>
88
107

89
108
</refentry>
90
-

91
109
<!-- Keep this comment at the end of the file
92
110
Local variables:
93
111
mode: sgml
94
112