reference/strings/functions/stripos.xml
71b1e926631d5f5bec9b2e2685553453349ae799
...
...
@@ -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.stripos">
3
+
<refentry xml:id="function.stripos" xmlns="http://docbook.org/ns/docbook">
4
4
<refnamediv>
5
5
<refname>stripos</refname>
6
6
<refpurpose>Find the position of the first occurrence of a case-insensitive substring in a string</refpurpose>
...
...
@@ -9,7 +9,7 @@
9
9
<refsect1 role="description">
10
10
&reftitle.description;
11
11
<methodsynopsis>
12
-
<type>int</type><methodname>stripos</methodname>
12
+
<type class="union"><type>int</type><type>false</type></type><methodname>stripos</methodname>
13
13
<methodparam><type>string</type><parameter>haystack</parameter></methodparam>
14
14
<methodparam><type>string</type><parameter>needle</parameter></methodparam>
15
15
<methodparam choice="opt"><type>int</type><parameter>offset</parameter><initializer>0</initializer></methodparam>
...
...
@@ -40,13 +40,9 @@
40
40
<term><parameter>needle</parameter></term>
41
41
<listitem>
42
42
<para>
43
-
Note that the <parameter>needle</parameter> may be a string of one or
44
-
more characters.
45
-
</para>
46
-
<para>
47
-
If <parameter>needle</parameter> is not a string, it is converted to
48
-
an integer and applied as the ordinal value of a character.
43
+
The string to search for.
49
44
</para>
45
+
&strings.parameter.needle.non-string;
50
46
</listitem>
51
47
</varlistentry>
52
48
<varlistentry>
...
...
@@ -66,7 +62,7 @@
66
62
<refsect1 role="returnvalues">
67
63
&reftitle.returnvalues;
68
64
<para>
69
-
Returns the position of where the needle exists relative to the beginnning of
65
+
Returns the position of where the needle exists relative to the beginning of
70
66
the <parameter>haystack</parameter> string (independent of offset).
71
67
Also note that string positions start at 0, and not 1.
72
68
</para>
...
...
@@ -87,6 +83,20 @@
87
83
</row>
88
84
</thead>
89
85
<tbody>
86
+
&strings.changelog.ascii-case-folding;
87
+
&strings.changelog.needle-empty;
88
+
<row>
89
+
<entry>8.0.0</entry>
90
+
<entry>
91
+
Passing an &integer; as <parameter>needle</parameter> is no longer supported.
92
+
</entry>
93
+
</row>
94
+
<row>
95
+
<entry>7.3.0</entry>
96
+
<entry>
97
+
Passing an &integer; as <parameter>needle</parameter> has been deprecated.
98
+
</entry>
99
+
</row>
90
100
<row>
91
101
<entry>7.1.0</entry>
92
102
<entry>
...
...
@@ -140,6 +150,9 @@ if ($pos2 !== false) {
140
150
<para>
141
151
<simplelist>
142
152
<member><function>mb_stripos</function></member>
153
+
<member><function>str_contains</function></member>
154
+
<member><function>str_ends_with</function></member>
155
+
<member><function>str_starts_with</function></member>
143
156
<member><function>strpos</function></member>
144
157
<member><function>strrpos</function></member>
145
158
<member><function>strripos</function></member>
...
...
@@ -151,7 +164,6 @@ if ($pos2 !== false) {
151
164
</refsect1>
152
165

153
166
</refentry>
154
-

155
167
<!-- Keep this comment at the end of the file
156
168
Local variables:
157
169
mode: sgml
158
170