Convert Ascii To Hex using VBScript

我与影子孤独终老i 提交于 2020-03-06 02:23:56

问题


is there any to convert a string into Hex using Vb-script?

here there is a simple guide doing this, but it seems it works only for numbers not alphabets.

http://www.w3schools.com/vbscript/func_hex.asp


回答1:


Here it is:

strString = "test"
strHex =""
For i=1 To Len(strString)
    strHex = strHex + Hex(Asc(Mid(strString,i,1)))
Next

WScript.Echo strHex


来源:https://stackoverflow.com/questions/24238568/convert-ascii-to-hex-using-vbscript

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!