kotlin check string is number code example Example: kotlin string contains integer str.matches(".*\\d.*");