Ever needed to find out whether all the characters in a string are numbers, so they can be converted to an int or validated for example? There are a couple of ways this can be achieved. Perhaps the most obvious way is something like this Or you can do it the way I prefer if…