Last active
November 14, 2015 13:54
-
-
Save gonejack/b9a10239268d65542d88 to your computer and use it in GitHub Desktop.
trim function for Chinese space characters
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
<?php | |
$s = preg_replace('^(([ \r\n\t])*( )*)*', '', $s); | |
$s = preg_replace('(([ \r\n\t])*( )*)*$', '', $s); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment