countOccurrences method

int countOccurrences(
  1. String character
)

Implementation

int countOccurrences(String character) {
  return allMatches(character).length;
}