From adab6107e99e91ae448ce5b3c1f58583c2c20458 Mon Sep 17 00:00:00 2001 From: Yuya Hamada Date: Sun, 7 Sep 2025 18:07:42 +0900 Subject: [PATCH] Add negative $offset for grapheme_strr functions --- reference/intl/grapheme/grapheme-strripos.xml | 3 +++ reference/intl/grapheme/grapheme-strrpos.xml | 3 +++ 2 files changed, 6 insertions(+) diff --git a/reference/intl/grapheme/grapheme-strripos.xml b/reference/intl/grapheme/grapheme-strripos.xml index 8de59da8ad98..700cde442f29 100644 --- a/reference/intl/grapheme/grapheme-strripos.xml +++ b/reference/intl/grapheme/grapheme-strripos.xml @@ -48,6 +48,9 @@ The position returned is still relative to the beginning of haystack regardless of the value of offset. + + The optional offset parameter allows you to specify where in haystack to start searching as an offset in grapheme units (not bytes or characters). If the offset is negative, it is treated relative to the end of the string. The position returned is still relative to the beginning of haystack regardless of the value of offset. The search is performed right to left, searching for the first occurrence of needle from the selected grapheme cluster. + diff --git a/reference/intl/grapheme/grapheme-strrpos.xml b/reference/intl/grapheme/grapheme-strrpos.xml index b83dc627a224..187601f87b8b 100644 --- a/reference/intl/grapheme/grapheme-strrpos.xml +++ b/reference/intl/grapheme/grapheme-strrpos.xml @@ -48,6 +48,9 @@ The position returned is still relative to the beginning of haystack regardless of the value of offset. + + The optional offset parameter allows you to specify where in haystack to start searching as an offset in grapheme units (not bytes or characters). If the offset is negative, it is treated relative to the end of the string. The position returned is still relative to the beginning of haystack regardless of the value of offset. The search is performed right to left, searching for the first occurrence of needle from the selected grapheme cluster. +