protected static function strLen($string){
    $encoding = function_exists('mb_detect_encoding') ? mb_detect_encoding($string) : false;
    return $encoding ? mb_strlen($string, $encoding) : strlen($string);
  }