toLong (Conversion to large integer)

Prev Next

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

Attempts to convert a given input value into a large integer of the 'Long' type.

Tooltip

Syntax: $toLong(any)

Parameter

Description

any

Any value (or object) which should be converted.

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

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

Syntax

$toLong(any)

Parameter

Name

Description

any

Any value (or object) which should be converted.

Return value

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

Examples

Syntax

Result

$toLong(1234)

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

$toLong($input)

Tries to convert the input value of the expression.