MCPcopy Index your code
hub / github.com/CodebuffAI/codebuff / ensureTrailingNewline

Function ensureTrailingNewline

sdk/src/tools/apply-patch.ts:56–58  ·  view source on GitHub ↗
(input: string)

Source from the content-addressed store, hash-verified

54}
55
56function ensureTrailingNewline(input: string): string {
57 return input.endsWith('\n') ? input : `${input}\n`
58}
59
60function stripTrailingNewline(input: string): string {
61 return input.endsWith('\n') ? input.slice(0, -1) : input

Callers 1

buildPatchAttemptsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected