mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-14 00:39:57 +09:00
iconv함수가 없더라도 오류메세지가 나오지 않도록 cut_str()함수에 구문 추가
git-svn-id: http://xe-core.googlecode.com/svn/trunk@1904 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
ee96c93126
commit
63b515a2fd
1 changed files with 1 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue