Function removeExtraSpaces

Removes extra spaces from a given string.

  • Parameters

    • str: string

      The input string to remove extra spaces from.

    Returns string

    The modified string with extra spaces removed.