该函数在字符串 s 中清除 Search(注意:如果 s 为 AAABBB,Search 为 AB。如何?) : Function StringCleaner(s As String, Search As String) As String Dim i As Integer, res As String res = s Do While InStr(res, Search) i = InStr(res, Search) res = Left(res, i - 1) & Mid(res, i + 1) Loop StringCleaner = res End Function
007 快速交换整数 可用以下的代码快速交换两个整数(Interger): a = a xor b b = a xor b a = a xor b  
|