在 vb.net 中比较字符串和修剪
我有一个来自另一个文件的字符串。该字符串的最大长度为 102 位。我需要将字符串与一对数字进行比较,然后从该字符串中删除这些数字。
例如 - 6125223659587412563265...直到 102 个
与该字符串比较的数字
- 第一组 - 61 个
新字符串 = 25223659587412563265
第二组 - 36 个
新字符串 = 252259587412563265
等等。该组数字最多应有 51 对 = 102,这将给出 string = "" 的最终结果 我怎样才能在循环中实现这一目标?
这不是答案,这是编辑问题。我不知道为什么,但编辑按钮消失了,所以我必须在这里编辑问题。 该字符串中不会出现重复项。最后,当比较完成后,我想看看成对留下了哪些数字。
I have this string that shall come in from another file. The string has maximum length of 102 digits. I need to compare the string with numbers in a pair and delete those from that string.
e.g - 6125223659587412563265... till 102
numbers that compare with this string-
first set - 61
new string = 25223659587412563265
second set - 36
new string = 252259587412563265
and so on. the set of numbers shall go to maximum of 51 pairs = 102, which shall give an end result of string = ""
How can i achieve this in a loop?
this is not answer, this is editing the question. i dont know why but the edit button just vaniashed so i have to edit question here.
No duplicates will ever be in this string. and in the end when compares are done, i want to see what numbers are left in pairs.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这是一个简单的解决方案。您需要将您的对添加到 List(Of String) 中,并初始化要更改的字符串的输入。
Here is a simple solution. You will need to add your pairs to the List(Of String) and also initialize input to the string you want to alter.