📄 unicodeclass.cls
字号:
VERSION 1.0 CLASS
BEGIN
MultiUse = -1 'True
Persistable = 0 'NotPersistable
DataBindingBehavior = 0 'vbNone
DataSourceBehavior = 0 'vbNone
MTSTransactionMode = 0 'NotAnMTSObject
END
Attribute VB_Name = "unicodeClass"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
Option Explicit
Public Function UnicodeFun(Strii$, IntType$, IntRes%) As Variant
Dim UnicodeFunArr() As Byte
Dim IntI%, IntL%, StrRes$, Ia1%, Ia2%, str$
str$ = Strii$
str$ = StrConv(str$, vbFromUnicode)
UnicodeFunArr = StrConv(str$, vbUnicode)
IntL = UBound(UnicodeFunArr)
StrRes$ = ""
If IntRes% = 1 Then
For IntI = 0 To IntL
Ia1% = UnicodeFunArr(IntI)
Ia2% = UnicodeFunArr(IntI + 1)
UnicodeFunArr(IntI) = Ia2%
UnicodeFunArr(IntI + 1) = Ia1%
If Ia2% < 16 Then StrRes$ = StrRes$ & "0"
StrRes$ = StrRes$ & CStr(Hex(Ia2%))
If Ia1% < 16 Then StrRes$ = StrRes$ & "0"
StrRes$ = StrRes$ & CStr(Hex(Ia1%)) & ","
IntI = IntI + 1
Next
If IntType = "byte" Then
UnicodeFun = UnicodeFunArr
Else
If IntType = "string" Then
UnicodeFun = StrRes$
End If
End If
Else
If IntRes% = 0 Then
For IntI = 0 To IntL
Ia1% = UnicodeFunArr(IntI)
Ia2% = UnicodeFunArr(IntI + 1)
If Ia1% < 16 Then StrRes$ = StrRes$ & "0"
StrRes$ = StrRes$ & CStr(Hex(Ia1%))
If Ia2% < 16 Then StrRes$ = StrRes$ & "0"
StrRes$ = StrRes$ & CStr(Hex(Ia2%)) & ","
IntI = IntI + 1
Next
If IntType = "byte" Then
UnicodeFun = UnicodeFunArr
Else
If IntType = "string" Then
UnicodeFun = StrRes$
End If
End If
End If
End If
'53 5A 4E 07 90 1A 4F E1
End Function
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -