截取字符串函数:字符长度测试和截取函数(可以测试1个汉字占两个字符长度)来源: 发布时间:星期四, 2009年2月12日 浏览:708次 评论:0
\'*************测 ![]() Function CheckStringLength(txt) txt=trim(txt) x = len(txt) y = 0 for ii = 1 to x ![]() y = y + 2 ![]() y = y + 1 end ![]() next CheckStringLength = y End Function\'************* 截取 ![]() function InterceptString(txt,length) txt=trim(txt) x = len(txt) y = 0 ![]() for ii = 1 to x ![]() y = y + 2 ![]() y = y + 1 end ![]() ![]() txt = left(trim(txt),ii) \' ![]() exit for end ![]() next InterceptString = txt ![]() InterceptString = \"\" end ![]() End Function 0
相关文章读者评论发表评论 |