You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feature #52198 [String] New locale aware casing methods (bram123)
This PR was squashed before being merged into the 7.1 branch.
Discussion
----------
[String] New locale aware casing methods
| Q | A
| ------------- | ---
| Branch? | 7.1
| Bug fix? | no
| New feature? | yes<!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no
| Tickets | Fix #52161
| License | MIT
Adds new localeUpper/localeLower/localeTitle methods to the AbstractUnicodeString class
- To change the string case according to locale-specific case mappings
Code examples:
```php
$string = new UnicodeString('άδικος');
echo $string->upper(), PHP_EOL; // ΆΔΙΚΟΣ
echo $string->localeUpper('el'), PHP_EOL; // ΑΔΙΚΟΣ
$string = new UnicodeString('ijssel');
echo $string->title(), PHP_EOL; // Ijssel
echo $string->localeTitle('nl'), PHP_EOL; // IJssel
$string = new UnicodeString('İSTANBUL');
echo $string->lower(), PHP_EOL; // i̇stanbul (LATIN SMALL LETTER I COMBINING DOT ABOVE)
echo $string->localeLower('tr'), PHP_EOL; // istanbul (LATIN SMALL LETTER I)
```
Commits
-------
7f4ed5c6720 [String] New locale aware casing methods
0 commit comments