Trim unicode whitespace in PHP 5.2

前端 未结 7 1499
隐瞒了意图╮
隐瞒了意图╮ 2020-12-01 09:17

How can I trim a string(6) \" page\", where the first whitespace is a 0xc2a0 non-breaking space?

I\'ve tried trim() and preg_match(\'

7条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-01 10:05

    Perhaps something from the multibyte string set of functions? http://php.net/manual/en/function.mb-ereg.php Can't see mb_trim, but there is a set of MB safe regex functions.

    G

提交回复
热议问题