removeWhiteSpace property

String get removeWhiteSpace

Removes all whitespace from the String.

Example

String foo = '   Hel l o W   orld';
String striped = foo.removeWhiteSpace; // returns 'HelloWorld';

Implementation

String get removeWhiteSpace {
  if (isBlank) {
    return blankIfNull;
  }
  return removeAny(whiteSpaceChars);
}