'用一个字符串去替代文件中的另一个字符串
Function ReplaceStrInFile(ByVal FileName As String, ByVal Str1 As String, ByVal Str2 As String) As Int16
If System.IO.File.Exists(FileName) = True Then
Dim Temp As String
Temp = System.IO.File.ReadAllText(FileName)
Temp = Replace(Temp, Str1, Str2)
System.IO.File.WriteAllText(FileName, Temp)
End If
End Function
Function ReplaceStrInFile(ByVal FileName As String, ByVal Str1 As String, ByVal Str2 As String) As Int16
If System.IO.File.Exists(FileName) = True Then
Dim Temp As String
Temp = System.IO.File.ReadAllText(FileName)
Temp = Replace(Temp, Str1, Str2)
System.IO.File.WriteAllText(FileName, Temp)
End If
End Function
|
暂时没有评论
发表评论 - 不要忘了输入验证码哦! | |||
作者: | 用户:
密码: 注册? 验证: |
||
评论:
禁止表情 禁止UBB 禁止图片 识别链接 识别关键字 ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
|||