Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

how to cut a certion part from a string in java

int startIndex = str.indexOf("(");
int endIndex = str.indexOf(")");
String replacement = "I AM JUST A REPLACEMENT";
String toBeReplaced = str.substring(startIndex + 1, endIndex);
System.out.println(str.replace(toBeReplaced, replacement));
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #cut #certion #part #string #java
ADD COMMENT
Topic
Name
6+1 =