CodeQL library for Ruby
codeql/ruby-all 0.8.15-dev (changelog, source)
Search

Predicate parseHexInt

Gets the integer value of hex when interpreted as hex. hex must be a valid hexadecimal string. For values greater than 7FFFFFFF (2^31-1, the maximum value that int can represent), there is no result.

"0"    => 0
"FF"   => 255
"f00d" => 61453

Import path

import codeql.util.Numbers
int parseHexInt(string hex)