Hex to Dec


I have a string (from serial) like this:
Where the last value 0168 in a Hex and I want to convert it to integer in decimal (shoud be 360)
How I can to do it?

Should be able to do something like this:

data = "0168"
value = Integer.parseInt(data, 16)

I haven’t tried this in a script, however.

Hi namraccr,
thank you for your tip.
The rigth syntax for rules is:
import java.lang.*
Integer::parseInt(data, 16)