toInteger (Conversion to large integer)

Prev Next

See also: toBigDecimal (Conversion to large decimal integer), toLong (Conversion to large integer), toNumber (Conversion to native number), toString (Convert to a string)

Attempts to convert a given input value into an integer of the 'Integer' type.

Tooltip

Syntax: $toInteger(any)

Parameter

Description

any

Any value (or object), which will be converted.

If the input value cannot be converted, nothing (null ) is returned.

Example: $toInteger(1234) → Returns an object of the 'Integer' type which has the numeric value '1234'.

Syntax

$toInteger(any)

Parameter

Name

Description

any

An arbitrary value (or object), which will be converted.

Return value

If the input value cannot be converted, nothing (null) is returned.

Examples

Syntax

Result

$toInteger(1234)

Returns an object of the 'Integer' type, which has the numeric value 1234.

$toInteger($input)

Tries to convert the input value of the expression.