How to trim whitespace¶
Use $::str::trim to remove leading and trailing whitespace from a character vector:
You can also import it for shorter syntax:
The result is a character vector with the whitespace stripped from both ends.
See also: Character arrays, Standard library -- strings