charCountWithoutSpaces method

int charCountWithoutSpaces()

Returns the number of non-whitespace characters in the string.

Implementation

int charCountWithoutSpaces() {
  return replaceAll(RegExp(r'\s+'), '').length;
}