simplified string operations

while CoffeeScript doesn't support negative indexes, `slice` does