Provide a filter application mechanism that takes a user-provided string and length, instead of a `git_buf`.