How-to · Strings
Remove leading and trailing whitespace from a string
Softanza
Q(" hi ").Trimmed()
#--> "hi"Output
hi
ran: printed what the recipe promises
run on 2026-10-02 22:33 inside the library at commit 0e72e2e2c; the expression carrying the promise was printed for the run · The recipe on GitHub(opens in a new tab)
The methods
stzString.Trimmed · stzString.TrimmedLeft · stzString.TrimmedRight
See also
Words for this task: trim, strip, whitespace, spaces, clean, remove padding

