I've just implemented the Knuth-Morris-Pratt String Matching algorithm in Kotlin, which can be used to find the occurrences of a pattern in a long text in linear time. Would you like to see a PR for it? Not sure if there's interest in it, but I figured I'd just ask
simple smile I've seen someone looking for a method like this a few weeks ago in this Slack. This is what it looks like:
https://gist.github.com/cbruegg/dada72b6c39e906d093b