Skip to content

Instantly share code, notes, and snippets.

@gonejack
Last active November 14, 2015 13:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gonejack/b9a10239268d65542d88 to your computer and use it in GitHub Desktop.
Save gonejack/b9a10239268d65542d88 to your computer and use it in GitHub Desktop.
trim function for Chinese space 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