📅  最后修改于: 2022-03-11 15:01:35.512000             🧑  作者: Mango
function xx (string){
return string.replace(/(\r\n|\n|\r)/gm, "");
}
console.log('Here's some text.\n It has some line breaks that will be removed \r using Javascript.\r\n');