I have a string that has the value of name:score. I want to split the string into two strings, string a with the value of name and str
name:score
a
name
Split creates an array with your strings in it:
String input = "name:score"; final String[] splitStringArray = input.split(":"); String a = splitStringArray[0]; String b = splitStringArray[1];