Answers for "js trim a specific character"

4

javascript remove specific character from string

var newString = oldString.replaceAll("character/string goes here", "");

// Example
var oldString = "Hello World!";
var newString = oldString.replaceAll("o", "");
console.log(newString);
// Prints 'Hell Wrld!' to console.
Posted by: Guest on September-08-2020
0

how to cut a string uptil specific character javascript

var str = "Abc: Lorem ipsum sit amet";
str = str.split(":").pop();
 // OR
str = str.split(":").shift();
Posted by: Guest on February-27-2021

Code answers related to "js trim a specific character"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language