reference/intl/grapheme/grapheme-substr.xml
d21607e3ecb3bd8bb67e098ab906287229d44572
...
...
@@ -36,9 +36,9 @@
36
36
<listitem>
37
37
<para>
38
38
Start position in default grapheme units.
39
-
If $start is non-negative, the returned string will start at the
40
-
$start'th position in $string, counting from zero. If $start is negative,
41
-
the returned string will start at the $start'th grapheme unit from the
39
+
If <parameter>offset</parameter> is non-negative, the returned string will start at the
40
+
<parameter>offset</parameter>'th position in <parameter>string</parameter>, counting from zero. If <parameter>offset</parameter> is negative,
41
+
the returned string will start at the <parameter>offset</parameter>'th grapheme unit from the
42
42
end of string.
43
43
</para>
44
44
</listitem>
...
...
@@ -48,12 +48,12 @@
48
48
<listitem>
49
49
<para>
50
50
Length in grapheme units.
51
-
If $length is given and is positive, the string returned will contain
52
-
at most $length grapheme units beginning from $start (depending on the
53
-
length of string). If $length is given and is negative, then
51
+
If <parameter>length</parameter> is given and is positive, the string returned will contain
52
+
at most <parameter>length</parameter> grapheme units beginning from <parameter>offset</parameter> (depending on the
53
+
length of string). If <parameter>length</parameter> is given and is negative, then
54
54
that many grapheme units will be omitted from the end of string (after the
55
-
start position has been calculated when a start is negative). If $start
56
-
denotes a position beyond this truncation, &false; will be returned.
55
+
start position has been calculated when <parameter>offset</parameter> is negative). If <parameter>offset</parameter>
56
+
denotes a position beyond this truncation, an empty string will be returned.
57
57
</para>
58
58
</listitem>
59
59
</varlistentry>
...
...
@@ -69,6 +69,29 @@
69
69
</para>
70
70
</refsect1>
71
71

72
+
<refsect1 role="changelog">
73
+
&reftitle.changelog;
74
+
<informaltable>
75
+
<tgroup cols="2">
76
+
<thead>
77
+
<row>
78
+
<entry>&Version;</entry>
79
+
<entry>&Description;</entry>
80
+
</row>
81
+
</thead>
82
+
<tbody>
83
+
<row>
84
+
<entry>8.0.0</entry>
85
+
<entry>
86
+
The function now consistently clamps out-of-bounds offsets to the string boundary.
87
+
Previously, &false; was returned instead of the empty string in some cases.
88
+
</entry>
89
+
</row>
90
+
</tbody>
91
+
</tgroup>
92
+
</informaltable>
93
+
</refsect1>
94
+

72
95
<refsect1 role="examples">
73
96
&reftitle.examples;
74
97
<example>
75
98