Re:Rope (data structure)
by rav on Saturday June 08, 2013 @03:27PM
(#5845973)
A while ago, I implemented ropes based on the 1995 paper by Boehm et al in JavaScript. The interface provides methods charAt, charCodeAt, concat and substring, so it functions as a drop-in replacement for JavaScript strings (provided you limit your use to the given supported methods).
https://github.com/Mortal/ropejs/blob/master/rope.js