getWordsCountFromRegex method

int getWordsCountFromRegex(
  1. String str
)

Implementation

int getWordsCountFromRegex(String str) {
  var length = str.split(" ").length;
  return length;
}