countPiece method

int countPiece(
  1. String piece,
  2. String arrngs
)

Implementation

int countPiece(String piece, String arrngs) {
  return (RegExp(piece).allMatches(arrngs).toList().length);
}