MCPcopy Create free account
hub / github.com/FlashpointProject/launcher / removeTrailingNewlines

Function removeTrailingNewlines

src/back/ManagedChildProcess.ts:244–250  ·  view source on GitHub ↗

* Remove all newlines at the end of a string * * @deprecated Use string.trim() * @param str String to trim

(str: string)

Source from the content-addressed store, hash-verified

242 * @param str String to trim
243 */
244function removeTrailingNewlines(str: string): string {
245 let newString = str;
246 while (newString.endsWith('\n')) {
247 newString = newString.substring(0, newString.length - 1);
248 }
249 return newString;
250}
251
252export class DisposableChildProcess extends ManagedChildProcess implements Disposable {
253 public toDispose: Disposable[];

Callers 1

logContentMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected