In Java is there a way to find out if first character of a string is a number?
One way is
string.startsWith(\"1\")
and do the abov
IN KOTLIN :
Suppose that you have a String like this :
String
private val phoneNumber="9121111111"
At first you should get the first one :
val firstChar=phoneNumber.slice(0..0)
At second you can check the first char that return a Boolean :
char
return
Boolean
firstChar.isInt() // or isFloat()