全角・半角スペースをトリムする/PHPメモ
非常に単純ですが、全角・半角スペースをトリムするファンクションのメモ。
/**
* 全角・半角スペースをトリムする
* 2009/12/18
*/
public function trimSpace($str)
{
return trim( mb_convert_kana($str, "s") );
}
You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.
Leave a Reply