Assuming s is your String variable
s.toInt()
These will throw an Exception if your String isn't a fully numeric String, ex: "123cat" or "cat"
intValue = s.toInt()
intValue = Integer.parseInt(s)
This will return null instead of throwing
intValue = s.toIntOrNull()