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)
| 139 | // Start Case: every whitespace-separated word starts with an uppercase letter. |
| 140 | // Examples: "My Feature", "Add New Endpoint". |
| 141 | func 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 | } |
no outgoing calls