使用字符串操作的几个函数就可以了/非常抱歉/我有很久没做VB了/可能找不到源代码了/就是类似Java StringTokenizer类/这是一段我写的Java代码/希望对您有帮助~~~~~public static String[] splitIt(String s, String delimiter){ String[] buff = null; try{ StringTokenizer st = new StringTokenizer(s, delimiter, false); int i = 0; buff = new String[st.countTokens()]; while (st.hasMoreTokens()) buff[i++] = st.nextToken(); }catch(Exception e){ e.printStackTrace(); } return buff; }
查一下这个 split()思路1: dim f Read File All to a Var文本文件每一行都有一个回车行换行(vbcrlf)dim a a=split(f,vbcrlf)取字符串某个字符用这个Mid(str,pos,len)col=mid(a(i),pos,1)思路2:用FileSystemObject 一行一行读出来 text1.text=text1.text & vbcrlf & mid(s,pos,1)
String[] buff = null;
try{
StringTokenizer st = new StringTokenizer(s, delimiter, false);
int i = 0;
buff = new String[st.countTokens()];
while (st.hasMoreTokens())
buff[i++] = st.nextToken();
}catch(Exception e){
e.printStackTrace();
}
return buff; }
split()思路1:
dim f
Read File All to a Var文本文件每一行都有一个回车行换行(vbcrlf)dim a
a=split(f,vbcrlf)取字符串某个字符用这个Mid(str,pos,len)col=mid(a(i),pos,1)思路2:用FileSystemObject
一行一行读出来
text1.text=text1.text & vbcrlf & mid(s,pos,1)