Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个十六进制字符串,其值类似于
26C726F026C426A1269A26AB26F026CC26E226C726E226CD
我想知道如何将它拆分为一个字符串数组,其中数组的每个索引都包含一组 2 个这些字符。
示例:string(0)=26,string(1)=C7,string(2) = 26,string(3) = F0,以此类推。我怎样才能做到这一点?
Dim MyList as New List(Of String) Dim s as String = "26C726F026C426A1269A26AB26F026CC26E226C726E226CD" For x as Integer = 0 to s.Length - 1 step 2 MyList.Add(s.substring(x,2)) Next
您可以使用MyList(0)、MyList(1)等来获取它