Timeline for Help: Aliens Programmers only speak ASCII
Current License: CC BY-SA 3.0
3 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Sep 3, 2016 at 10:07 | comment | added | Neil | @Arnauld Doesn't work for (e.g.) a bare newline character. Also, to include backticks in a comment, precede them with a backslash. | |
Sep 3, 2016 at 2:30 | comment | added | Arnauld |
I think .split().map() may win over .replace() . Once escaped characters optimized with backticks, this should be 85 bytes: s=>s.split('\n').map(c=>(s=[...c]).join('\t')+'\n'+s.map(c=>c.charCodeAt()).join('\t')).join('\n') (Sorry, I've no idea if/how backticks can be included in a comment.)
|
|
Sep 2, 2016 at 22:31 | history | answered | Neil | CC BY-SA 3.0 |