What do you want to save?
Add Code snippet
New code examples
-
Python 2021-09-12 15:09:03
parsing text in python
my_string = 'Names: Romeo, Juliet' # split the string at ':' step_0 = my_string.split(':') # get the first slice of the list step_1 = step_0[1] # split the string at ',' step_2 = step_1.split(',') # strip leading and trailing edge spaces of each item ... Add solution -
-
Java 2021-09-06 03:07:03
how to split string in java android
String currentString = "Fruit: they taste good"; String[] separated = currentString.split(":"); separated[0]; // this will contain "Fruit" separated[1]; // this will contain " they taste good" Add solution
Best helpers
+10
+5
+5
+5
+5
+5
+5
+5
+5
+5