lib/standard/ropes: Adapted substring method for Ropes.