社区
VB基础类
帖子详情
在线等……VB中如何把String转换为Byte数组????快回,马上给分。
shinyblue
2003-11-20 10:09:33
如题!!!
...全文
495
4
打赏
收藏
在线等……VB中如何把String转换为Byte数组????快回,马上给分。
如题!!!
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
4 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
shinyblue
2003-11-20
打赏
举报
回复
strconv 是很好的方法,可以解决有中文字符的问题,那谢谢了,不过我该怎么解决VB.NET中的String和Byte数组的互换呢????
还是结了吧
AresChen
2003-11-20
打赏
举报
回复
dim a AS string
dim b() as byte
dim v as variant
v=a
b=v
ok!要多去关心一下Variant类型啊,很有用的。顺便说一句,从Byte转回String,也是一样。
TechnoFantasy
2003-11-20
打赏
举报
回复
Private Sub Command1_Click()
Dim a As String
Dim s() As Byte
a = "abcdefg"
s = StrConv(a, vbFromUnicode)
For i = LBound(s) To UBound(s)
Debug.Print s(i)
Next i
End Sub
脆皮大雪糕
2003-11-20
打赏
举报
回复
Dim a As String
Dim b() As Byte
Dim i As Integer
a = "abcd1234"
ReDim b(Len(a) - 1)
For i = 0 To Len(a) - 1
DoEvents
b(i) = Asc(Mid(a, i + 1, 1))
Next
VB
图片
转换
为
Byte
()和从
Byte
()
中
读取图片的捷径
VB
图片
转换
为
Byte
()和从
Byte
()
中
读取图片的捷径
vb
6.0
Byte
数组
转换
为字符串(兼容
中
英文)
VB
Byte
数组
转换
为字符串(兼容
中
英文),
VB
Byte
数组
转换
为字符串(
中
英文),
VB
Byte
数组
转换
为字符串(兼容
中
文),
VB
Byte
数组
转换
为字符串(兼容英文),
VB
Byte
转换
为字符串,
VB
Byte
转换
字符串,
VB
Byte
转字符串,
VB
Byte
字符串,
VB
Byte
,
VB
两个
Byte
二进制值 合并
转换
为
中
文,
VB
两个
Byte
二进制值
转换
为
中
文,
VB
两个
Byte
二进制
Java
中
字符串与
byte
数组
之间的
转换
方法
本文介绍了Java
中
字符串和
byte
数组
之间的
转换
方法,包括将字符串
转换
为
byte
数组
和将
byte
数组
转换
为字符串。其
中
,字符串的get
Byte
s()方法和Charset类的encode()方法可以将字符串
转换
为
byte
数组
,
String
的构造方法和Charset类的decode()方法可以将
byte
数组
转换
为字符串。本文将详细介绍Java
中
字符串和
byte
数组
之间的
转换
方法,包括将字符串
转换
为
byte
数组
和将
byte
数组
转换
为字符串。
String
的构造方法可以将一个
byte
数组
转换
为一个字符串。
C#
中
byte
数组
与
string
类型之间的
转换
string
类型
转换
为
byte
[]:
string
str = "Test";
byte
[] bytTemp = System.Text.Encoding.Default.Get
Byte
s(str);
byte
[]
转换
为
string
string
strTemp = System.BitConverter.To
String
(bytTemp); 但是得到的结果为54-65-73-74,这里需要进行
转换
转换
代码:
byte
[] bytTemp2 = new
byte
[strSplit.Length]; f
string
类的简单操作
package dishiyitian; import java.util.Arrays; /* * 1):
String
的创建和
转换
:
byte
[] get
Byte
s():把字符串
转换
为
byte
数组
char[] toCharArray():把字符串
转换
为char
数组
String
(
byte
[]
byte
s):把
byte
数组
转换
为字符串
String
...
VB基础类
7,732
社区成员
197,678
社区内容
发帖
与我相关
我的任务
VB基础类
VB 基础类
复制链接
扫一扫
分享
社区描述
VB 基础类
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章