rfc:mb_trim
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
rfc:mb_trim [2024/04/15 01:09] – Modify $characters is null youkidearitai | rfc:mb_trim [2024/04/15 08:40] (current) – old revision restored (2023/11/24 06:26) youkidearitai | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== PHP RFC: Multibyte for trim function mb_trim, mb_ltrim and mb_rtrim ====== | ====== PHP RFC: Multibyte for trim function mb_trim, mb_ltrim and mb_rtrim ====== | ||
- | * Version: 0.1.1 | + | * Version: 0.1 |
* Date: 2023-10-18 | * Date: 2023-10-18 | ||
* Author: Yuya Hamada (https:// | * Author: Yuya Hamada (https:// | ||
Line 17: | Line 17: | ||
===== Proposal ===== | ===== Proposal ===== | ||
Add mb_trim() function: | Add mb_trim() function: | ||
- | |||
- | **Modified 2024-04-15** | ||
- | When $characters is null when default parameter, trim list below: | ||
< | < | ||
- | function mb_trim(string $string, string | + | function mb_trim(string $string, string $characters = " \f\n\r\t\v\x00\u{00A0}\u{1680}\u{2000}\u{2001}\u{2002}\u{2003}\u{2004}\u{2005}\u{2006}\u{2007}\u{2008}\u{2009}\u{200A}\u{2028}\u{2029}\u{202F}\u{205F}\u{3000}\u{0085}\u{180E}" |
</ | </ | ||
< | < | ||
- | function mb_ltrim(string $string, string | + | function mb_ltrim(string $string, string $characters = " \f\n\r\t\v\x00\u{00A0}\u{1680}\u{2000}\u{2001}\u{2002}\u{2003}\u{2004}\u{2005}\u{2006}\u{2007}\u{2008}\u{2009}\u{200A}\u{2028}\u{2029}\u{202F}\u{205F}\u{3000}\u{0085}\u{180E}" |
</ | </ | ||
< | < | ||
- | function mb_rtrim(string $string, string | + | function mb_rtrim(string $string, string $characters = " \f\n\r\t\v\x00\u{00A0}\u{1680}\u{2000}\u{2001}\u{2002}\u{2003}\u{2004}\u{2005}\u{2006}\u{2007}\u{2008}\u{2009}\u{200A}\u{2028}\u{2029}\u{202F}\u{205F}\u{3000}\u{0085}\u{180E}" |
</ | </ | ||
- | Here's the list of characters trimmed | + | Here's the list of characters trimmed: |
Same as trim: | Same as trim: |
rfc/mb_trim.1713143362.txt.gz · Last modified: 2024/04/15 01:09 by youkidearitai