integer()

Example 1:

var answer = String.integer("34")

In this example, answer will contain the number 34

Example 2:

var num1 = 3.1415926
var num2 = 2.4567
var totalInt = String.integer(num1 * num2)

In this example, totalInt will contain the number 7