[DOC-CVS] [doc-en] master: ext/intl: Add negative $offset for grapheme_strr functions (#4864)
[email protected] (tekimen via GitHub) Fri, 3 Jul 2026 15:00:03 +0000
| Newsgroups | php.doc.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: tekimen (youkidearitai) Committer: GitHub (web-flow) Pusher: jordikroon Date: 2026-07-03T17:00:00+02:00 Commit: https://github.com/php/doc-en/commit/2583cd865645eea478d9a9b265d95c28a1ee5525 Raw diff: https://github.com/php/doc-en/commit/2583cd865645eea478d9a9b265d95c28a1ee5525.diff ext/intl: Add negative $offset for grapheme_strr functions (#4864) * Add negative $offset for grapheme_strr functions Co-authored-by: Jordi Kroon <[email protected]> Changed paths: M reference/intl/grapheme/grapheme-strripos.xml M reference/intl/grapheme/grapheme-strrpos.xml Diff: diff --git a/reference/intl/grapheme/grapheme-strripos.xml b/reference/intl/grapheme/grapheme-strripos.xml index 07321cd1166e..eae9fdb78eac 100644 --- a/reference/intl/grapheme/grapheme-strripos.xml +++ b/reference/intl/grapheme/grapheme-strripos.xml @@ -49,6 +49,9 @@ The position returned is still relative to the beginning of <parameter>haystack</parameter> regardless of the value of <parameter>offset</parameter>. </para> + <simpara> + The optional offset parameter allows you to specify where in <parameter>haystack</parameter> to start searching as an <parameter>offset</parameter> in grapheme units (not bytes or characters). If the <parameter>offset</parameter> is negative, it is treated relative to the end of the string. The position returned is still relative to the beginning of <parameter>haystack</parameter> regardless of the value of offset. The search is performed right to left, searching for the first occurrence of <parameter>needle</parameter> from the selected grapheme cluster. + </simpara> </listitem> </varlistentry> <varlistentry> diff --git a/reference/intl/grapheme/grapheme-strrpos.xml b/reference/intl/grapheme/grapheme-strrpos.xml index b3708e82755e..3cabc4150f4a 100644 --- a/reference/intl/grapheme/grapheme-strrpos.xml +++ b/reference/intl/grapheme/grapheme-strrpos.xml @@ -49,6 +49,9 @@ The position returned is still relative to the beginning of <parameter>haystack</parameter> regardless of the value of <parameter>offset</parameter>. </para> + <simpara> + The optional offset parameter allows you to specify where in <parameter>haystack</parameter> to start searching as an <parameter>offset</parameter> in grapheme units (not bytes or characters). If the <parameter>offset</parameter> is negative, it is treated relative to the end of the string. The position returned is still relative to the beginning of <parameter>haystack</parameter> regardless of the value of offset. The search is performed right to left, searching for the first occurrence of <parameter>needle</parameter> from the selected grapheme cluster. + </simpara> </listitem> </varlistentry> <varlistentry>