rfc:mb_trim
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
rfc:mb_trim [2023/10/18 07:03] – Add my GitHub youkidearitai | rfc:mb_trim [2024/04/15 08:40] (current) – old revision restored (2023/11/24 06:26) youkidearitai | ||
---|---|---|---|
Line 3: | Line 3: | ||
* Date: 2023-10-18 | * Date: 2023-10-18 | ||
* Author: Yuya Hamada (https:// | * Author: Yuya Hamada (https:// | ||
- | * Status: | + | * Status: |
* First Published at: http:// | * First Published at: http:// | ||
===== Introduction ===== | ===== Introduction ===== | ||
PHP does not have a multibyte equivalent of the trim function. It is possible to get close enough behavior using preg_replace("/ | PHP does not have a multibyte equivalent of the trim function. It is possible to get close enough behavior using preg_replace("/ | ||
+ | |||
+ | One of use case is "trim Byte Order Mark". I think mb_ltrim would be work: | ||
+ | |||
+ | < | ||
+ | mb_ltrim($string, | ||
+ | </ | ||
===== Proposal ===== | ===== Proposal ===== | ||
Line 66: | Line 72: | ||
</ | </ | ||
- | Other symbols: | + | Other symbols |
< | < | ||
U+0085 NEXT LINE (NEL) | U+0085 NEXT LINE (NEL) | ||
Line 78: | Line 84: | ||
* Difficult to search | * Difficult to search | ||
* Difficult to store in memory | * Difficult to store in memory | ||
+ | * Mapping with other character codes may be incompatible | ||
+ | * For example, to express Hiragana, UTF-8 uses [あ-ゞ], EUC-JP [あ-ゝゞ], | ||
+ | |||
+ | |||
===== Backward Incompatible Changes ===== | ===== Backward Incompatible Changes ===== | ||
Line 104: | Line 114: | ||
===== Open Issues ===== | ===== Open Issues ===== | ||
https:// | https:// | ||
- | |||
- | ===== Unaffected PHP Functionality ===== | ||
- | List existing areas/ | ||
- | |||
- | This helps avoid any ambiguity, shows that you have thought deeply about the RFC's impact, and helps reduces mail list noise. | ||
===== Future Scope ===== | ===== Future Scope ===== | ||
Line 116: | Line 121: | ||
Include these so readers know where you are heading and can discuss the proposed voting options. | Include these so readers know where you are heading and can discuss the proposed voting options. | ||
- | ===== Patches and Tests ===== | + | ===== Voting |
- | Links to any external patches and tests go here. | + | |
- | If there is no patch, make it clear who will create a patch, or whether a volunteer to help with implementation is needed. | + | <doodle title=" |
- | + | * Yes | |
- | Make it clear if the patch is intended to be the final patch, or is just a prototype. | + | * No |
- | + | </ | |
- | For changes affecting the core language, you should also provide a patch for the language specification. | + | |
===== Implementation ===== | ===== Implementation ===== | ||
https:// | https:// | ||
- | |||
- | ===== References ===== | ||
- | Links to external references, discussions or RFCs | ||
===== Rejected Features ===== | ===== Rejected Features ===== | ||
Keep this updated with features that were discussed on the mail lists. | Keep this updated with features that were discussed on the mail lists. |
rfc/mb_trim.1697612582.txt.gz · Last modified: 2023/10/18 07:03 by youkidearitai