pub fn trim_javascript_end(text: &str) -> &strExpand description
What:
Remove trailing JavaScript whitespace,
as String.prototype.trimEnd.
&str borrows text;
the result borrows a slice of it.
Why:
Git’s PID file text is trimmed at the end only before its pid prefix is read.
In TS you’d write (pseudocode):
function trimJavascriptEnd(text: string): string { return text.trimEnd(); }