toInteger

Converts a string to an integer.

Note:

Use the Special String Operators for string concatenation, string inclusion, and simple comparison.

Type and Usage

Parameters

The only parameter is the string.

Output

Returns an integer value. If the string does not evaluate to a number, or evaluates to a non-integer number, an error is thrown.

Example

Converts the string 4 to an integer and returns the value 4:

<$toInteger("4")$>