computer 版 (精华区)

发信人: windoe (为中国电信做贡献), 信区: program
标  题: VB:怎样在一个字符串中替换里面的另外一个字符串?
发信站: 听涛站 (Fri Mar 10 19:09:10 2000), 转信

Public Sub sReplace(String1 As String, String2 As String, RepString As Strin
g)
Dim I As Integer
I = 1
Do
If (I > Len(String1)) Then Exit Do
I = InStr(I, String1, String2)
If I Then
String1 = Left$(String1, I - 1) + RepString + Mid$(String1, I + Len(Striing2
)+1 )
I = I + 2
DoEvents
End If
Loop While I
Loop While I
End Sub


--By Kammi's SuperPost General Version
--

夜中不能寐,起坐弹鸣琴。
    薄帷鉴明月,清风吹我襟。
孤鸿号外野,翔鸟鸣北林。
    徘徊将何见,忧思独伤心。


[百宝箱] [返回首页] [上级目录] [根目录] [返回顶部] [刷新] [返回]
Powered by KBS BBS 2.0 (http://dev.kcn.cn)
页面执行时间:5.970毫秒