?? byte_str.asp
字號:
<%
Function Byte2STR(vIn)
strReturn = ""
For i = 1 To LenB(vIn)
ThisCharCode = AscB(MidB(vIn,i,1))
If ThisCharCode < &H80 Then
strReturn = strReturn & Chr(ThisCharCode)
Else
NextCharCode = AscB(MidB(vIn,i+1,1))
strReturn = strReturn & Chr(CLng(ThisCharCode) * &H100 + CInt(NextCharCode))
i = i + 1
End If
Next
bytes2STR = strReturn
End Function
Function STR2Byte(vIn)
dim strReturn,ThisCharCode,NextCharCode
strReturn = ""
For i = 1 To Len(vIn)
ThisCharCode = hex(AscW(Mid(vIn,i,1)))
if (len(ThisCharCode) mod 2) <> 0 then
ThisCharCode = "0" & ThisCharCode
end if
Response.Write(thischarcode) & "<br>"
If len(ThisCharCode) = 2 Then
strReturn = strReturn & Chr(eval("&h" & ThisCharCode))
Else
NextCharCode = Mid(ThisCharCode,3,2)
ThisCharCode = Mid(ThisCharCode,1,2)
strReturn = strReturn & Chr(eval("&h" & ThisCharCode)) & Chr(eval("&h" & NextCharCode))
Response.Write("&h" & ThisCharCode & ":" & eval("&h" & ThisCharCode)) & ":" & Chr(eval("&h" & ThisCharCode)) & "<BR>"
Response.Write("&h" & NextCharCode & ":" & eval("&h" & NextCharCode)) & ":" & Chr(eval("&h" & NextCharCode)) & "<BR>"
End If
Next
STR2Byte = strReturn
End Function
%>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -