Answers for "replace first character in string java"

3

replace character in string java

String str = ".............................."; 

        int index = 5; 
  
        char ch = '|'; 
 
        StringBuilder string = new StringBuilder(str); 
        string.setCharAt(index, ch); 

        System.out.println(string);
Posted by: Guest on August-14-2020
0

replace everything before a character in java

result = result.split("\n")[0];
Posted by: Guest on July-21-2020
0

java replaceall single character

.replaceAll("(?<!\\S)[^ ](?!\\S)", " ").trim()
Posted by: Guest on March-06-2020

Code answers related to "replace first character in string java"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language