Closed krichter722 closed 3 years ago
Agreed; and even better would be if we'd support arbitrary sized search strings...
I made an attempt at arbitrary string length: https://github.com/devinacker/bgrep/commit/59dae693f42c4480637ed02ae3d5c259c8ab4422
I didn't do any real testing to see how much the heap allocations impacted performance, but at least now it's possible to search thousands of bytes at once if needed. I can send a pull request if you think it looks okay.
Invoking
causes failure with
invalid/empty search string
. This error message would be more helpful if it contained the length limit, so that one doesn't have to figure it out with trial and error.