/*------------------------------------------------------------------------------ 1. Function Name : f_korean_truncate 2. Input Arguments : String a_sstr - ¼ýÀÚÇѱۿµ¾î È¥ÇÕ ¹®ÀÚ¿­ Integer a_ilen - Length 3. Access Type : Public 4. Return Value : String 5. Logic Note : ÁöÁ¤ ¹®ÀÚ¿­À» ÁöÁ¤ ±æÀÌ·Î ¸¸µé¾î Return ÇѱÛÀÌ ÀÖÀ» °æ¿ì ±ÛÀÚ°¡ ©¸®Áö ¾Ê°Ô ÇÔ 6. EX) sle_1.text = f_korean_truncate("1°¡³ª2´Ù",4) ===> "1°¡"¸¦ return. ------------------------------------------------------------------------------- Date Author Description ------------ ------------------------ ----------------------------------------- 2008/03/28 XXX »õ·Î ¸¸µë -----------------------------------------------------------------------------*/ String ls_Cur long ll_i, ll_byte FOR ll_i = 1 TO LEN(a_sstr) If ASC(Mid(a_sstr, ll_i, 1)) > 127 Then if ll_byte <= (a_ilen - 2) then ll_byte += 2 end if Else if ll_byte <= (a_ilen - 1) then ll_byte += 1 end if End If ls_Cur = LeftA(a_sstr, ll_byte) If ll_byte = a_ilen or ll_byte = (a_ilen - 1) Then Return ls_Cur EXIT End if NEXT Return ls_Cur