怎样将字符串“AABBCCDDEE”变为“AA-BB-CC-DD-EE”,多谢啦
怎样将字符串“AABBCCDDEE”变为“AA-BB-CC-DD-EE”,谢谢啦!
RT
------解决方案--------------------
Dim str As String = "AABBCCDDEEFFGGHHIIJJKK "
Dim i As Int16, j As Int16
i = str.Length / 2 - 1
For j = 1 To i
str = str.Insert(j * 2 + j - 1, "- ")
Next
MsgBox(str)
RT
------解决方案--------------------
Dim str As String = "AABBCCDDEEFFGGHHIIJJKK "
Dim i As Int16, j As Int16
i = str.Length / 2 - 1
For j = 1 To i
str = str.Insert(j * 2 + j - 1, "- ")
Next
MsgBox(str)