Search code examples
haxe

Is there a way to convert a string to hexadecimal in haxe?


I am trying to write a program in Haxe but I got stuck on trying to convert a string to hex. I found a solution but I couldn't get it working. Can anyone help?


Solution

  • To convert a string in hexadecimal format into an integer:

    final hex = Std.parseInt("0x00");
    

    https://api.haxe.org/Std.html#parseInt