README.md

December 4, 2022 ยท View on GitHub

AWESOME String Replace

Description

To replace a word or characters in a string, using JavaScript.

More Info

Submitted On
Byw0rm
LevelBeginner
User Rating4.0 (8 globes from 2 users)
Compatibility
CategoryString Manipulation
WorldJava
Archive File

Source Code

function stringreplace(str,srchfor,rplwith){
	while (str.indexOf(srchfor)>-1) {
	 pos= str.indexOf(srchfor);
	 str = "" + (str.substring(0, pos) + rplwith + str.substring((pos + srchfor.length), str.length));
    }
   return str;
}