Exemplo n.º 1
0
 function subString($str, $start = 0, $length = null, $encoding = 'UTF-8')
 {
     if ($length === null) {
         $length = AJAXChatString::stringLength($str);
     }
     if (function_exists('mb_substr')) {
         return mb_substr($str, $start, $length, $encoding);
     } else {
         if (function_exists('iconv_substr')) {
             return iconv_substr($str, $start, $length, $encoding);
         } else {
             return substr($str, $start, $length);
         }
     }
 }
Exemplo n.º 2
0
 function stringLength($str, $encoding = 'UTF-8')
 {
     return AJAXChatString::stringLength($str, $encoding);
 }