$len){ $str = mb_substr($str, 0, $len, "UTF-8"); if($symbols) $str .= $symbols; } } return $str; } public static function split($str, $len){ if(strlen($str) > $len){ $str = strrev($str); $str = str_split($str, $len); $arr = array(); foreach($str as $val){ array_unshift($arr, strrev($val)); } $str = $arr; } else $str = array($str); return $str; } public static function rsplit($str, $len){ if(strlen($str) > $len){ $str = strrev($str); $str = str_split($str, $len); $arr = array(); foreach($str as $val){ $arr[] = strrev($val); } $str = $arr; } else $str = array($str); return $str; } public static function isBlank($str){ $str = trim($str); return empty($str) && $str !== 0 && $str !== "0" ? true : false; } }