compressSpaces method

String? compressSpaces({
  1. bool trim = true,
})

Extension method to remove consecutive spaces in a String and optionally trim the result. This is an alias for removeConsecutiveSpaces.

Implementation

String? compressSpaces({bool trim = true}) =>
    // Defer to the main implementation.
    removeConsecutiveSpaces(trim: trim);