[wp-trac] [WordPress Trac] #63804: Proposal of wp_trim(): JavaScript-compatible alternative for trim()

WordPress Trac noreply at wordpress.org
Sun Aug 10 02:44:54 UTC 2025


#63804: Proposal of wp_trim(): JavaScript-compatible alternative for trim()
--------------------------+------------------------------
 Reporter:  takayukister  |       Owner:  (none)
     Type:  enhancement   |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Formatting    |     Version:
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:
--------------------------+------------------------------

Comment (by takayukister):

 `js_trim()` is easier to understand. I agree on the naming.

 If you use `mb_trim()`, you'll need:

 * to define `mb_trim()` in wp-includes/compat.php because it's not yet
 available in most of the user environments.
 * to specify the third parameter to `UTF-8`, otherwise the internal
 encoding will be used.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/63804#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list