Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

java split string without removing

String string = "Hello-World";
String[] split = string.Replace("-", "#-").Split("#"); 
//# is added to the Splitpoint so we can split on #

Output:
split = [Hello, -World]
 
PREVIOUS NEXT
Tagged: #java #split #string #removing
ADD COMMENT
Topic
Name
8+4 =