Although importing `stringr` adds a dependency, we can use a lot of stringr's functionality, cf `str_delete`