[VB.NET]怎样将字符串“AABBCCDDEE”变为“AA-BB-CC-DD-EE”,谢谢啦!

前端之家收集整理的这篇文章主要介绍了[VB.NET]怎样将字符串“AABBCCDDEE”变为“AA-BB-CC-DD-EE”,谢谢啦!前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
怎样将字符串“AABBCCDDEE”变为“AA-BB-CC-DD-EE”,谢谢啦! RT __________________________________________________________________________ 两个两个字符加-行不行呀 __________________________________________________________________________ i*2+1 然后再去掉最后一个“-” __________________________________________________________________________ i*2+1 然后再去掉最后一个“-”? 写完整一点啊。 __________________________________________________________________________ ==,给你写一下 __________________________________________________________________________ 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) __________________________________________________________________________ 谢谢啊。我试试。马上结帐 __________________________________________________________________________ 你试试吧 __________________________________________________________________________

猜你在找的VB相关文章