strip / chompCleans up whitespace.Syntaxtext.stripDescriptionstrip removes leading/trailing spaces, chomp removes the trailing newline.ExampleLoading editor…▶ Try it yourselfExpected outputspaceWhen to use?Input sanitization.Related commandsgsub / sub← upcase / downcase / capitalizegsub / sub →