Description

ToInteger will convert the value to a number (int64).

ToValue(0).ToInteger() => 0
ToValue(1.1).ToInteger() => 1
ToValue("11").ToInteger() => 11

If there is an error during the conversion process (like an uncaught exception), then the result will be 0 and an error.

ToInteger is referenced in 24 repositories

github.com/robertkrimen/otto github.com/sfreiberg/shepherd github.com/emicklei/melrose

...