Just out of curiosity, how is the std::string type implemented? In other words, what are the internals? Is it an immutable C string? Is it an over-allocated char[]? How does it work? Any insight would be appreciated.
(If you were wondering, I'm building an interpreter/runtime, and I need efficient strings for what I'm doing, and so I need to know whether I need to use my own implementation or not.)
Thanks in advance.
(If you were wondering, I'm building an interpreter/runtime, and I need efficient strings for what I'm doing, and so I need to know whether I need to use my own implementation or not.)
Thanks in advance.
Comment