MCPcopy Create free account
hub / github.com/MiniCodeMonkey/chief / formatPRDTitle

Function formatPRDTitle

internal/tui/completion.go:462–470  ·  view source on GitHub ↗

formatPRDTitle converts a kebab-case PRD name to title case.

(name string)

Source from the content-addressed store, hash-verified

460
461// formatPRDTitle converts a kebab-case PRD name to title case.
462func formatPRDTitle(name string) string {
463 words := strings.Split(name, "-")
464 for i, w := range words {
465 if len(w) > 0 {
466 words[i] = strings.ToUpper(w[:1]) + w[1:]
467 }
468 }
469 return strings.Join(words, " ")
470}
471
472// ansiTruncate returns the first maxWidth visual columns of an ANSI-styled string,
473// properly passing through escape sequences without counting them as visible width.

Callers 1

RenderMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected