Strips out device control codes in the ASCII range.
$str = UTF8::strip_ascii_ctrl($str);
string Core_UTF8::strip_ascii_ctrl( string $str )
参数列表
参数 类型 描述 默认值 $str
string
String to clean
string
public static function strip_ascii_ctrl($str)
{
return preg_replace('/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F]+/S', '', $str);
}