LOG IN SIGN UP
Documentation

std.strtol

Converts a string to an integer, using the second argument as base. Base can be 2 to 36, or 0. A 0 base means that base 10 (decimal) is used, unless the string has a 0x or 0 prefix, in which case base 16 (hexadecimal) and base 8 (octal) are used respectively. For example, std.strtol("0xa0", 0) will return 160.

Format

INTEGER
std.strtol(STRING s, UINT base)

Examples

if (std.strtol(req.http.X-HexValue, 16) == 42) {
  set req.http.X-TheAnswer = "Found";
}