', '《', '》', '.', '。', '/', '、', '?', '?', ';', 'nbsp', ]; $str = str_replace($filter, '', $string); return trim($str); } /** * @param string $string * * @return string */ public static function trim($string) { $filter = [ "\0", "\n", "\t", "\x0B", "\r", ' ', ]; $str = str_replace($filter, '', $string); return trim($str); } /** * Is Set and Not Empty. * * @param $value * * @return bool */ public static function isSetAndNotEmpty($value) { return isset($value) && !empty($value); } /** * Is Set and Not Empty and Not Null. * * @param $value * * @return bool */ public static function isSetAndNotEmptyAndNotNull($value) { return isset($value) && !empty($value) && $value !== 'null'; } }