isAlphaNumeric

private fun isAlphaNumeric(line: String): Boolean

Checks whether line is a String which contains alphanumeric values only.

Checks for each character of the string whether it is in the set of allowed characters.

Return

true if line is alphanumeric and false if line is not alphanumeric.

Parameters

line

The input string provided b the user.