Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

replace substring at index java

public static void main(String[] args) {

        StringBuffer buf = new StringBuffer("123456789");

        int start = 3;
        int end = 6;
        buf.replace(start, end, "foobar"); 
        System.out.println(buf);

    }

}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #replace #substring #index #java
ADD COMMENT
Topic
Name
9+1 =