Convert variable to type_integer

type:to_integer($variable) : INT

type:to_integer(10.2)
#=> 10

type:to_integer("10.2")
#=> 10

type:to_integer("0")
#=> 0

type:to_integer('good')
#=> 0

type:to_integer('1good')
#=> 1

type:to_integer([])
#=> 0

type:to_integer([1,2,3])
#=> 1

type:to_integer(function(){})
#=> Error: type_function could not be converted to int

Copyright ©2013-2022 SunSed®. All rights reserved.