String to replace New Line Chars with regex - Node.js String

Node.js examples for String:Replace

Description

String to replace New Line Chars with regex

Demo Code


String.prototype.replaceNewLineChars = function( replacement )
{
  return this.replace( /\n/g, replacement ) ;
}

Related Tutorials