reference/intl/grapheme/grapheme-strpos.xml
2245ff665ae4b3037728ee52c247b409ad75de35
...
...
@@ -9,7 +9,7 @@
9
9
&reftitle.description;
10
10
<para>&style.procedural;</para>
11
11
<methodsynopsis>
12
-
<type>int</type><methodname>grapheme_strpos</methodname>
12
+
<type class="union"><type>int</type><type>false</type></type><methodname>grapheme_strpos</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>
...
...
@@ -43,10 +43,11 @@
43
43
<term><parameter>offset</parameter></term>
44
44
<listitem>
45
45
<para>
46
-
The optional $offset parameter allows you to specify where in $haystack to
46
+
The optional <parameter>offset</parameter> parameter allows you to specify where in <parameter>haystack</parameter> to
47
47
start searching as an offset in grapheme units (not bytes or characters).
48
-
The position returned is still relative to the beginning of haystack
49
-
regardless of the value of $offset.
48
+
If the offset is negative, it is treated relative to the end of the string.
49
+
The position returned is still relative to the beginning of <parameter>haystack</parameter>
50
+
regardless of the value of <parameter>offset</parameter>.
50
51
</para>
51
52
</listitem>
52
53
</varlistentry>
...
...
@@ -58,10 +59,32 @@
58
59
<refsect1 role="returnvalues">
59
60
&reftitle.returnvalues;
60
61
<para>
61
-
Returns the position as an integer. If needle is not found, strpos() will return boolean FALSE.
62
+
Returns the position as an integer. If <parameter>needle</parameter> is not found, <function>grapheme_strpos</function> will return &false;.
62
63
</para>
63
64
</refsect1>
64
65
66
+
<refsect1 role="changelog">
67
+
&reftitle.changelog;
68
+
<informaltable>
69
+
<tgroup cols="2">
70
+
<thead>
71
+
<row>
72
+
<entry>&Version;</entry>
73
+
<entry>&Description;</entry>
74
+
</row>
75
+
</thead>
76
+
<tbody>
77
+
<row>
78
+
<entry>7.1.0</entry>
79
+
<entry>
80
+
Support for negative <parameter>offset</parameter>s has been added.
81
+
</entry>
82
+
</row>
83
+
</tbody>
84
+
</tgroup>
85
+
</informaltable>
86
+
</refsect1>
87
+

65
88
<refsect1 role="examples">
66
89
&reftitle.examples;
67
90
<example>
...
...
@@ -105,7 +128,6 @@ print grapheme_strpos( $char_a_ring_nfd . $char_a_ring_nfd . $char_o_diaeresis_n
105
128
</para>
106
129
</refsect1>
107
130
</refentry>
108
-

109
131
<!-- Keep this comment at the end of the file
110
132
Local variables:
111
133
mode: sgml
112
134