string to hex value

java, string

Solution

When you have a string starting with 0x or #

Integer.decode(hexStr);

is the goal

Or

Integer.parseInt(hexString, 16);

Problem

Is there any java utility to convert string to hex value (integer) ?

Original source

Related problems