I'm using a method to iteratively perform a replace in a string.
function replaceAll(srcString, target, newContent){
while (srcString.indexOf(target) != -1)
srcString = srcString.replace(target,newContent);
return srcString;
}
But it doesn't work for the target text that I want, mainly because I can't think of how to properly write that text: What I want to remove is, literally, "\n"
, (included the comma and the quotes), so what to pass as second param in order to make it work properly?
Thanks in advance.