Better String Library (2015)
raw.githubusercontent.com
raw.githubusercontent.com
* https://en.wikipedia.org/wiki/String_(computer_science)
--
* https://en.wikipedia.org/wiki/Rope_(data_structure)
* https://hn.algolia.com/?query=Ropes%2C%20an%20Alternative%20...
--
* https://en.wikipedia.org/wiki/Piece_table
* https://hn.algolia.com/?query=%22Piece%20Table%22
--
* https://en.wikipedia.org/wiki/Gap_buffer
* https://hn.algolia.com/?query=Gap%20Buffer
--
Anything else? Would be nice to implement all of these as a single library!
What am I missing?
In Windows 8, someone at Microsoft decided they had too many string types, so they introduced another one (HSTRING).
While writing it I was surprised by all the text vs binary crap Windows does.
Each BSTR is on the COM heap, and they have just one length field, no notion of "capacity". So you don't get amortized constant time appends.
The NT kernel had UNICODE_STRING which had a capacity. So many string types...