-
-
Save sandacn/32721e3b4efa9a5cd67d485957bfebe1 to your computer and use it in GitHub Desktop.
php: mb_trim
This file contains hidden or 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
function mb_trim( $str ) { | |
return mb_ereg_replace( | |
'^[[:space:]]*([\s\S]*\S)?[[:space:]]*$', '\1', $str ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
faster than forked version