标题:string转二进制的函数吗?
只看楼主
live41
Rank: 10Rank: 10Rank: 10
等 级:贵宾
威 望:67
帖 子:12442
专家分:0
注 册:2004-7-22
结帖率:66.67%
 问题点数:0 回复次数:0 
string转二进制的函数吗?

Public Function BinConvert(textdata As String) As String

Dim i As Integer
Dim chrdata As String

BinConvert = ""

For i = 1 To Len(textdata)

chrdata = Mid(textdata, i, 1)

If chrdata <> Chr(13) Then

If chrdata = "$" Then

If IsHex(Mid(textdata, i + 1, 2)) Then
chrdata = Mid(textdata, i + 1, 2)
BinConvert = BinConvert & Chr(Val("&H" + chrdata))
i = i + 2
Else
BinConvert = BinConvert & chrdata
End If
Else
BinConvert = BinConvert & chrdata
End If
End If
Next i

End Function

搜索更多相关主题的帖子: 二进制 string 函数 
2006-03-09 15:23



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-49352-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.056110 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved