[DISCUSSION] grapheme_* functions adds locale in parameter (or any?)
| From: | youkidearitai | Date: | Thu, 05 Jun 2025 01:04:00 +0000 |
| Subject: | [DISCUSSION] grapheme_* functions adds locale in parameter (or any?) | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-127601@lists.php.net to get a copy of this message | ||
Hi, Internals
I would like adds locale parameter that already there are grapheme_* functions.
Because Unicode is locale-dependency but grapheme_* functions is not
locale-dependency.
For example, Add $locale parameter is below.
```
grapheme_extract(
string $haystack,
int $size,
int $type = GRAPHEME_EXTR_COUNT,
int $offset = 0,
int &$next = null,
string ?$locale = null
): string|false
grapheme_str_split(string $string, int $length = 1, string ?$locale =
null): array|false
grapheme_stripos(string $haystack, string $needle, int $offset = 0,
string ?$locale = null): int|false
grapheme_stristr(string $haystack, string $needle, bool $beforeNeedle
= false, string ?$locale = null): string|false
grapheme_strlen(string $string, ?string $locale = null): int|false|null
grapheme_strpos(string $haystack, string $needle, int $offset = 0,
string ?$locale = null): int|false
grapheme_strripos(string $haystack, string $needle, int $offset = 0,
string ?$locale = null): int|false
grapheme_strrpos(string $haystack, string $needle, int $offset = 0,
string ?$locale = null): int|false
grapheme_strstr(string $haystack, string $needle, bool $beforeNeedle =
false, ?$locale = null): string|false
grapheme_substr(string $string, int $offset, ?int $length = null,
?string ?$locale = null): string|false
```
What do you think?
I would like go to write an RFC if this is fine.
Regards
Yuya
--
---------------------------
Yuya Hamada (tekimen)
- https://tekitoh-memdhoi.info
- https://github.com/youkidearitai
-----------------------------