The rope data structure
-
03-07-2021 - |
Question
I was reading about the rope data structure.I am interested in building a text editor using C++ and Qt. My question is: Does built-in string manipulating functions in programming languages like C++ use the rope data structure? Or do I need to write my own code for implementing ropes so that I can perform string operations like concatenation and deletion more efficiently?
Solution
std::string
is not a rope, but SGI STL provides rope
.
If you plan on implementing your own rope, I'd recommend SGI's rope implementation overview for some implementation details.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow