cast.ToInt
Syntax
cast.ToInt INPUT
Returns
int
Alias
int
With a decimal (base 10) input:
{{ int 11 }} → 11 (int)
{{ int "11" }} → 11 (int)
{{ int 11.1 }} → 11 (int)
{{ int 11.9 }} → 11 (int)
With a binary (base 2) input:
{{ int 0b11 }} → 3 (int)
{{ int "0b11" }} → 3 (int)
With an octal (base 8) input (use either notation):
{{ int 011 }} → 9 (int)
{{ int "011" }} → 9 (int)
{{ int 0o11 }} → 9 (int)
{{ int "0o11" }} → 9 (int)
With a hexadecimal (base 16) input:
{{ int 0x11 }} → 17 (int)
{{ int "0x11" }} → 17 (int)