Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js replace all char in string

"x".replaceAll("x", "xyz");
// xyz

"x".replaceAll("", "xyz");
// xyzxxyz

"aA".replaceAll("a", "b", true);
// bb

"Hello???".replaceAll("?", "!");
// Hello!!!
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #js #replace #char #string
ADD COMMENT
Topic
Name
9+4 =