withNormalizedWhitespace method

String withNormalizedWhitespace()

Replaces all whitespace characters with a single space.

Implementation

String withNormalizedWhitespace() {
  return this.replaceAll(RegExp(r'[\s]+'), ' ');
}