countWords method

int countWords()

Returns a string abbreviation.

Implementation

int countWords() {
  if (validate().isEmptyOrNull) return 0;
  return this!.split(RegExp('\\s+')).length;
}