iconv함수가 없더라도 오류메세지가 나오지 않도록 cut_str()함수에 구문 추가

git-svn-id: http://xe-core.googlecode.com/svn/trunk@1904 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
zero 2007-07-11 07:40:36 +00:00
parent ee96c93126
commit 63b515a2fd

View file

@ -181,6 +181,7 @@
* 손쉽고 확실한 변환을 위해 2byte unicode로 변형한후 처리를 한다
**/
function cut_str($string, $cut_size, $tail='...') {
if(!function_exists('iconv')) return $string;
if(!$string || !$cut_size) return $string;
$unicode_str = iconv("UTF-8","UCS-2",$string);
if(strlen($unicode_str) < $cut_size*2) return $string;