withNormalizedWhitespace method

String withNormalizedWhitespace([
  1. String replace = ' '
])

Replaces all whitespace characters with replace.

Implementation

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