Skip to content

occurrences

In std/string.

fn occurrences(self, part: String) : Int

How many non-overlapping times part occurs in self; 0 for an empty part: "aaaa" | occurrences("aa") is 2.