MCPcopy Create free account
hub / github.com/ZenNotes/zennotes / itoa

Function itoa

apps/server/internal/vault/parse.go:420–441  ·  view source on GitHub ↗
(n int)

Source from the content-addressed store, hash-verified

418}
419
420func itoa(n int) string {
421 if n == 0 {
422 return "0"
423 }
424 neg := false
425 if n < 0 {
426 neg = true
427 n = -n
428 }
429 var buf [20]byte
430 i := len(buf)
431 for n > 0 {
432 i--
433 buf[i] = byte('0' + n%10)
434 n /= 10
435 }
436 if neg {
437 i--
438 buf[i] = '-'
439 }
440 return string(buf[i:])
441}

Callers 1

fmtTaskIDFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected