Created
May 4, 2017 09:43
-
-
Save forecho/1554719caed897daaa279b80a65a05a4 to your computer and use it in GitHub Desktop.
This file contains 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 | |
/** | |
* author : forecho <caizhenghai@gmail.com> | |
* createTime : 2016/3/30 16:47 | |
* description: | |
*/ | |
namespace common\helpers; | |
class StringHelper | |
{ | |
/** | |
* 替换空白/换行 | |
* @param $string | |
* @return string | |
*/ | |
public static function trim($string) | |
{ | |
return str_replace(["\r\n", "\r", "\n", " ", "\t"], '', $string); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment