VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Convert an ascii string to hex characters, as a hex editor would.

by Joey Sullivan (2 Submissions)
Category: String Manipulation
Compatability: Visual Basic 4.0 (32-bit)
Difficulty: Unknown Difficulty
Originally Published: Thu 9th August 2001
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Convert an ascii string to hex characters, as a hex editor would.

Rate Convert an ascii string to hex characters, as a hex editor would.



'Example:
'The text "Joey Rules" would be converted to
'4A 6F 65 79 20 52 75 6C 65 73

Function TextToHex(Text As String) As String
Dim text3 As Integer
For y = 1 To Len(Text)
Text2 = Mid(Text, y, 1)
TextToHex = TextToHex & Hex(Asc(Text2)) & " "
Next
End Function


Download this snippet    Add to My Saved Code

Convert an ascii string to hex characters, as a hex editor would. Comments

No comments have been posted about Convert an ascii string to hex characters, as a hex editor would.. Why not be the first to post a comment about Convert an ascii string to hex characters, as a hex editor would..

Post your comment

Subject:
Message:
0/1000 characters