Returns a new string produced from s
, in which
all occurences of oldSubstr
are replaced with the newSubstr
.
Tip:
You may call this function in a method-like style:
s.replace(oldSubstr, newSubstr)
replace("java.lang.Object", ".", "/")
"java/lang/Object"
"Veni, vidi, vici".replace(",", " ->")
"Veni -> vidi -> vici"