how to check if letter is digit python code example
Example 1: c# check if string is only letters and numbers
if (textVar.All(c => Char.IsLetterOrDigit(c))) {
// String contains only letters & numbers
}
Example 2: java check if string is number
try {
int n = Integer.parseInt(str);
} catch (NumberFormatException e) {
// str is not a number
}