std::core::string

count

fn usz String.count(self, String substr)
Check how many non-overlapping instances of a substring there is.

If the substring has zero length, the number of matches is zero.

Parameters