reference/strings/functions/strcmp.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.strcmp">
3
+
<refentry xml:id="function.strcmp" xmlns="http://docbook.org/ns/docbook">
4
4
<refnamediv>
5
5
<refname>strcmp</refname>
6
6
<refpurpose>Binary safe string comparison</refpurpose>
...
...
@@ -10,8 +10,8 @@
10
10
&reftitle.description;
11
11
<methodsynopsis>
12
12
<type>int</type><methodname>strcmp</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
<simpara>
17
17
Note that this comparison is case sensitive.
...
...
@@ -23,7 +23,7 @@
23
23
<para>
24
24
<variablelist>
25
25
<varlistentry>
26
-
<term><parameter>str1</parameter></term>
26
+
<term><parameter>string1</parameter></term>
27
27
<listitem>
28
28
<para>
29
29
The first string.
...
...
@@ -31,7 +31,7 @@
31
31
</listitem>
32
32
</varlistentry>
33
33
<varlistentry>
34
-
<term><parameter>str2</parameter></term>
34
+
<term><parameter>string2</parameter></term>
35
35
<listitem>
36
36
<para>
37
37
The second string.
...
...
@@ -45,13 +45,30 @@
45
45
<refsect1 role="returnvalues">
46
46
&reftitle.returnvalues;
47
47
<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
48
+
Returns <literal>-1</literal> if <parameter>string1</parameter> is less than
49
+
<parameter>string2</parameter>; <literal>1</literal> if <parameter>string1</parameter>
50
+
is greater than <parameter>string2</parameter>, and <literal>0</literal> if they are
51
51
equal.
52
52
</para>
53
53
</refsect1>
54
54

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

55
72
<refsect1 role="examples">
56
73
&reftitle.examples;
57
74
<para>
...
...
@@ -87,7 +104,6 @@ if (strcmp($var1, $var2) !== 0) {
87
104
</refsect1>
88
105

89
106
</refentry>
90
-

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