'*************测字符串长度************** Function CheckStringLength(txt) txt=trim(txt) x = len(txt) y = 0 for ii = 1 to x if asc(mid(txt,ii,1)) < 0 or asc(mid(txt,ii,1)) 255 then '如果是汉字 y = y + 2 else y = y + 1 end if next CheckStringLength = y End Function '************* 截取字符串 ************** function InterceptString(txt,length) txt=trim(txt) x = len(tx...[ 查看全文 ]
答:import java.util.*; class test { public static void main(String[] args) { String str1="001,002,003,004,006",str2 = "001,002,005"; String str=""; TreeSet ts = new TreeSet(); StringTokenizer st = new StringTokenizer(str1,","); while (st.hasMoreTokens()) { ts.add(st.nextToken()); } st = new StringTokenizer(str2,","); while (st.hasMoreTokens()) { ts.add(st.ne...[ 查看全文 ]