MCPcopy Index your code
hub / github.com/codehamr/codehamr / runeBoundaryUp

Function runeBoundaryUp

internal/ctx/ctx.go:112–120  ·  view source on GitHub ↗

runeBoundaryUp walks i right to a rune start so out[i:] never starts mid-sequence. Safe for i <= 0.

(out string, i int)

Source from the content-addressed store, hash-verified

110
111// runeBoundaryUp walks i right to a rune start so out[i:] never starts
112// mid-sequence. Safe for i <= 0.
113func runeBoundaryUp(out string, i int) int {
114 if i <= 0 {
115 return 0
116 }
117 for i < len(out) && !utf8.RuneStart(out[i]) {
118 i++
119 }
120 return i
121}
122
123// PackResult records what Pack kept: the packed messages.

Callers 1

TruncateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected