Skip to content

Latest commit

 

History

History
23 lines (17 loc) · 361 Bytes

convert-hex-to-string.md

File metadata and controls

23 lines (17 loc) · 361 Bytes

Convert hex to string

string.format("%#x", 0xaf)
  • string.format - formats string with a given set of rules
  • %#x - treat given variable as hex number
  • 0xaf - hex value to convert to string

group: convert_str

Example:

hex = 0xaf
print(string.format("%#x", hex))
0xaf

link_youtube: https://youtu.be/3Fv-7SSkCr4