JavaScript view newlines & tabs in string
View a string's newlines and tabs in JavaScript. This function replaces line endings/newlines and tabs:
Javascript
function raw(str) { return str.replace(/\t/g, '\\t') .replace(/\r\n/g, '\\r\\n') .replace(/\r/g, '\\r') .replace(/\n/g, '\\n'); }
The /g modifier finds and replaces all occurrences.
Tip BCH: qrt9edpnmmr65xsnd3xdlfa0r6rpt36rfqrevu6h54
Tip BTC: 1NX28KTAVbeWai4UFqJZXYDMMpr6SwLYCw
Tip ETH: 0x53bEc9317d97a7BEBD68957A87C39EA54cD20a48
Tip LTC: LhDAkf1MLRepNe9PUuuJSPuAvx8GHqA1ed