rfc:mb_ucfirst
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
rfc:mb_ucfirst [2024/01/16 03:57] – created youkidearitai | rfc:mb_ucfirst [2024/03/20 21:13] (current) – Implemented mb_ucfirst and mb_lcfirst youkidearitai | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== PHP RFC: Multibyte for ucfirst, lcfirst functions, mb_ucfirst mb_lcfirst ====== | ====== PHP RFC: Multibyte for ucfirst, lcfirst functions, mb_ucfirst mb_lcfirst ====== | ||
- | * Version: 0.1 | + | * Version: 0.1.2 |
* Date: 2024-01-16 | * Date: 2024-01-16 | ||
* Author: Author: Yuya Hamada(https:// | * Author: Author: Yuya Hamada(https:// | ||
- | * Status: | + | * Status: |
* First Published at: http:// | * First Published at: http:// | ||
Line 12: | Line 12: | ||
function mb_ucfirst(string $str, ?string $encoding = null): string | function mb_ucfirst(string $str, ?string $encoding = null): string | ||
{ | { | ||
- | return | + | return |
} | } | ||
</ | </ | ||
Line 32: | Line 32: | ||
function mb_ucfirst(string $string, ?string $encoding = null): string | function mb_ucfirst(string $string, ?string $encoding = null): string | ||
</ | </ | ||
+ | |||
+ | The first character in mb_ucfirst uses Unicode title case. | ||
< | < | ||
Line 37: | Line 39: | ||
</ | </ | ||
- | According to research about Unicode, | + | From what I've researched with Unicode, |
+ | |||
+ | For example, In Vietnamese, the first letter is not always capitalized. | ||
+ | |||
+ | * ngày Quốc khánh 2-9 (September 2nd National Day) | ||
+ | * tiếng Nhật (Japanese) | ||
+ | |||
+ | Another example, In Georgian should uses title case. | ||
+ | |||
+ | * mb_strtoupper(" | ||
+ | * mb_strtoupper(" | ||
+ | |||
+ | Correct case. | ||
+ | |||
+ | * mb_ucfirst(" | ||
+ | * mb_ucfirst(" | ||
===== Backward Incompatible Changes ===== | ===== Backward Incompatible Changes ===== | ||
Line 69: | Line 86: | ||
===== Voting ===== | ===== Voting ===== | ||
+ | <doodle title=" | ||
+ | * Yes | ||
+ | * No | ||
+ | </ | ||
===== Implementation ===== | ===== Implementation ===== |
rfc/mb_ucfirst.1705377436.txt.gz · Last modified: 2024/01/16 03:57 by youkidearitai