Is there a built-in Mathematica function that parses strings representing numbers in hexadecimal form, for example. "89ab"?
I could use
FromDigits[
ToExpression[Characters["89ab"] /.
Thread[CharacterRange["a", "f"] -> Range[10, 15]]],
16
]
or even
ToExpression["16^^" <> "89ab"]
but I'm sure there should be a more robust built-in function with error checking that I just can't find.
source
share