multi-store/extend/Xpyun/util/Encoding.php

18 lines
278 B
PHP
Raw Normal View History

<?php
namespace Xpyun\util;
class Encoding
{
public static function CalcGbkLenForPrint($data)
{
return (strlen($data) + mb_strlen($data, "UTF8")) / 2;
}
public static function CalcAsciiLenForPrint($data)
{
return strlen($data);
}
}
?>