MCPcopy Index your code
hub / github.com/conventionalcommit/commitlint / IsStartCase

Function IsStartCase

internal/casing/casing.go:141–149  ·  view source on GitHub ↗

IsStartCase reports whether s is in Start Case format. Start Case: every whitespace-separated word starts with an uppercase letter. Examples: "My Feature", "Add New Endpoint".

(s string)

Source from the content-addressed store, hash-verified

139// Start Case: every whitespace-separated word starts with an uppercase letter.
140// Examples: "My Feature", "Add New Endpoint".
141func IsStartCase(s string) bool {
142 for _, w := range strings.Fields(s) {
143 runes := []rune(w)
144 if !unicode.IsUpper(runes[0]) {
145 return false
146 }
147 }
148 return true
149}

Callers 2

TestIsStartCaseFunction · 0.92
CheckFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestIsStartCaseFunction · 0.74