I think <@U0BFVR6N5> brings up a good point, that ...
# lucee
d
I think @ben brings up a good point, that the trimWhitespace() function needs better documentation: https://www.bennadel.com/blog/4522-understanding-the-trimwhitespace-function-in-lucee-cfml.htm Also, this function doesn't really work the way I'd expect. Maybe consolidatedWhitespace() would be a more intuitive name, because it doesn't actually trim whitespace: https://trycf.com/gist/c7b80f37ae052c8c0030ac1736dd85b6/lucee5?theme=monokai
Copy code
<cfscript>
    buffer = "+++hello+world+++".replace("+", chr(32), "all");

	echo( htmlCodeFormat('"'&trimWhitespace(buffer)&'"') );

</cfscript>
This returns
" hello world "
, so there's still whitespace on each side of the string, but it just consolidated the spaces.