string_ref: make substr past end just return empty instead of exception