michelle
09-17-2003, 08:19 AM
I have a string that has a lot of \n (newlines) in the beginning. Is there some way I can trim them off?
I tried:
function stripNL(oldString) {
return oldString.replace(/\n/g, "");
}
But it does not seem to work.
Is there a good function or a built in function for trimming whitespaces and newlines of the beginning and end of a string?
// Michelle
I tried:
function stripNL(oldString) {
return oldString.replace(/\n/g, "");
}
But it does not seem to work.
Is there a good function or a built in function for trimming whitespaces and newlines of the beginning and end of a string?
// Michelle