pub fn trim_javascript(text: &str) -> &strExpand description
What:
Remove leading and trailing JavaScript whitespace,
as String.prototype.trim.
&str borrows text;
the result borrows a slice of it.
Why:
Shared strings must be trimmed exactly as the incumbent trims them.
In TS you’d write (pseudocode):
function trimJavascript(text: string): string { return text.trim(); }