isAnInteger

Determines if the supplied string is a valid integer.

Example (REPL) usage:

>>> isAnInteger("howdy")
res1: kotlin.Boolean = false
>>> isAnInteger("5")
res2: kotlin.Boolean = true
>>> "5".toInt()
res3: kotlin.Int = 5

Return

true if the string can be converted to an integer

Parameters

s

string to check