Simplify consume_string() as Michael suggested