7 ms·
That's right. At that point I learned about std::borrow::Cow (copy-on-write) and it worked pretty nicely. The unescaping is done lazily (on access) so it's inde
by juancampa 5y ago
That's right. At that point I learned about std::borrow::Cow (copy-on-write) and it worked pretty nicely. The unescaping is done lazily (on access) so it's indeed zero-copy unless strictly necessary.
The parser was for a tiny language we use to express references within graphs over at membrane.io. similar to URLs but typed and not ambiguous. It's simple enough. Perhaps writing a URL parser would be good for learning.