Trim()
Removes leading and trailing spaces from a string.
Trim( string=string );
Returns: String
Examples
// create variable with a string of text that has leading and trailing spaces
foo = " Hello World! ";
// output variable
writeDump("-" & foo & "-");
// output variable without leading and trailing spaces
writeDump("-" & Trim(foo) & "-");
See also
- Strings
- LTrim()
- RTrim()
- TrimWhitespace()
- string.trim()
- Search Issue Tracker
- Search Lucee Test Cases (good for further, detailed examples)