您好,欢迎访问一九零五行业门户网

一个好用的字符串截取函数(汉字一个算两个字符,英文算一个字符)

, >), l = len(str)t = 0strtemp = strstrlen = clng(strlen)for i = 1 to lc = abs(asc(mid(str, i, 1)))if c > 255 thent = t + 2elset = t + 1end ifif t >= strlen thenstrtemp = left(str, i)exit forend ifnextif strtemp str thenstrtemp = strtemp & …end ifgottopic = replace(replace(replace(replace(strtemp, , ), chr(34), ), >, >), end function?>
复制代码
其它类似信息

推荐信息