janet-lang / janet

A dynamic language and bytecode vm
https://janet-lang.org
MIT License
3.45k stars 223 forks source link

Add C escape sequences #1203

Closed czkz closed 1 year ago

czkz commented 1 year ago

Some C escape sequences are not supported in Janet strings, namely:

Full list at https://en.cppreference.com/w/c/language/escape. Supporting them could be useful to copy-paste strings from other languages (and I need \b).

ml-2 commented 1 year ago

You probably already know this, but you can use \x08 instead of \b if you need it right now in Janet.

bakpakin commented 1 year ago

We don't really need things like \? and \' but I suppose they don't hurt for copy pasting.