Mutable strings in Java: design, implementation and lightweight text-search algorithms