test/cases/0160-string: add tests and small fix for split_by_offset