查找替换所选字符
2006-02-27 11:41:49 来源:WEB开发网
核心提示:->FunctionsReplace(SearchLineAsString,SearchForAsString,ReplaceWithAsString)DimvSearchLineAsString,foundAsIntegerfound=InStr(SearchLine,SearchFor):vSearchLine=S
->FunctionsReplace(SearchLineAsString,SearchForAsString,ReplaceWithAsString)
DimvSearchLineAsString,foundAsInteger
found=InStr(SearchLine,SearchFor):vSearchLine=SearchLine
Iffound<>0Then
vSearchLine=""
Iffound>1ThenvSearchLine=Left(SearchLine,found-1)
vSearchLine=vSearchLine ReplaceWith
Iffound Len(SearchFor)-1<Len(SearchLine)Then_
vSearchLine=vSearchLine Right$(SearchLine,Len(SearchLine)-found-Len(SearchFor) 1)
EndIf
sReplace=vSearchLine
EndFunction->
->
赞助商链接