Writing ANSI Escape Strings With C++
The other day I saw Gary Bernhardts live streaming - ok I didn’t see it live, but anyway - of writing an editor in Ruby. It made me think that it would be a great topic for
my other blog polyglotbits.com. So while I pondered how to write a very basic editor in every language on the site I continued watching Gary’s stream, and look at his program selecta which he referenced quite a lot in the cast.
I quickly realized that I needed some very basic packages made in most of the languages. And I started writing an ansi escape library in C++.
The library is basically just some string manipulation, which allows you to reference commonly used escape sequences by a name.
I still need a lot of other small libraries for writing the editor. I guess I’ll start in C++ - and work my way through all the other languages…. But maybe the ruby version will just point people to this screencast instead