It seems that this problem will always ask for the forum to ask the functions used to use today. I saw the PHP column. The main method is simple. First, we look at the two methods for previous applications ---------- -------------------------------------------------- ----- Function Msubstr ($ Str, $ START, $ LEN) {$ Strlen = $ Start $ Len; for ($ I = 0; $ Strlen; $ I ) {if (ORD (Substr STR, $ I, 1))> 0xA0) {$ Tmpstr. = Substr ($ STR, $ I, 2); $ I ;} else $ TMPSTR. = Substr ($ Str, $ I, 1);} Return $ TMPSTR;} ------------------------------------ PHP $ STR = "This character is good. Long, ^ _ ^ "; $ Short_STR = Showsh ($ STR, 4); // Intercept four Chinese characters in front, the result is: this character ... Echo" $ Short_STR "; Function Csubstr ($ STR, $ START, $ LEN) {$ Strlen = Strlen ($ STR); $ Clen = 0; for ($ I = 0; $ I