PHP trim()函数详解
2021-03-26 01:24
标签:制表符 0x0d strip 五个 feed binary rri 垂直 The trim - 去除字符串里的空白符及其他指定字符 Strip whitespace (or other characters) from the beginning and end of a string 参数 类似函数, PHP trim()函数详解 标签:制表符 0x0d strip 五个 feed binary rri 垂直 The 原文地址:https://www.cnblogs.com/jiaoran/p/12643589.html定义
描述
trim ( string $str [, string $character_mask = " \t\n\r\0\x0B" ] ) : string
character_mask
可指定任意字符,使用..可指定一个范围
默认去除下面五个字符
示例
trim($text, " \t.");
trim($hello, "Hdle");
// (from 0 to 31 inclusive)
trim($binary, "\x00..\x1F");
参看
ltrim()
,rtrim()