Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 ------- 7f4ed5c [String] New locale aware casing methods
- Loading branch information
Showing
3 changed files
with
193 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters