Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
String replace(String str, String text, String by) {
// Replaces text with by in string
int strLength = str.length();
int txtLength = text.length();
if ((strLength == 0) || (txtLength == 0))
return str;
int i = str.indexOf(text);
if ((i == 0) && (text != str.substring(0,txtLength))) return str;
if (i == -1) return str;
String newstr = str.substring(0,i) + by;
if (i+txtLength < strLength)
newstr += replace(str.substring(i+txtLength,strLength),text,by);
return newstr;
}
newString = replace(oldStr, "oldWord", newWord");