trimEnd (Function)

Signature: trimEnd(s: string) -> string

Description: Removes trailing ASCII whitespace.

Parameters

  • s (string): The string to trim

Returns: string

Example

print(trimEnd("  hi  "))  // "  hi"
print (trimEnd "  hi  ")  // "  hi"