如何在 VB 中每 7 个字符分割一个字符串 [英] How do I split a string every 7th charecter in VB

查看:43
本文介绍了如何在 VB 中每 7 个字符分割一个字符串的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在试图弄清楚语法时遇到了困难.我在一个变量中有一行二进制文件,我想知道如何每第 7 个字符拆分该字符串,以便我可以将它放在一个 ascii 表中以找到它的等效项.

I am having difficulties trying to figure out the syntax. I have a line of binary in a variable and i want to know how to to split that string every 7th character so i can put it in an ascii table to find its equivalent.

推荐答案

根据你的场景,你也可以做一个子串来满足你的要求.

Based on your scenario, you can also do a substring to satisfy your requirement.

Dim theString As String = "w3rs0fd90as90f9sda0faf"

Dim FirstSevenCharacters as String= theString.Substring(0, 7)

Dim CharactersAfterTheFirstSeven as String= theString.Substring(7, theString.Length - 7)

这篇关于如何在 VB 中每 7 个字符分割一个字符串的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆