2010-10-29 44 views

回答

0

您可以比較每個字符串中的字符:

Dim s1 = "0000" 
Dim s2 = "0001" 

Dim result = "" 

If s1.Length = s2.Length Then 

    For a = 0 To s1.Length - 1 

     If s1(a) <> s2(a) Then 
      result &= "-" 
     Else 
      result &= s1(a) 
     End If 

    Next 

End If 

結果= 000-

+0

感謝兄弟.. :) – 2010-10-29 20:44:27