3

In solidity, I can take advantage of the hex literal in order to get back the corresponding hex value of a string, in the following way:

hex"001122FF"

I am wondering how to apply such literal on a variable. Let's say my hex string is a constant hexValue.

How can I apply the literal on hexValue?

Thanks for the help

2
  • It is not clear what you are trying to achieve, can you write some code to explain the idea?
    – Ismael
    Apr 1, 2021 at 0:50
  • Consider a variable string memory value = "001122FF". How can I apply the hex literal on the variable value? Apr 1, 2021 at 10:55

0

Browse other questions tagged or ask your own question.