trim the trailing slashes at the end of a string.

  • Parameters

    • str: string

    Returns string