81
}
82
84
>
var b strings.Builder
85
>
// Capitalize the first letter of each word split by underscore
86
>
for word := range strings.SplitSeq(s, "_") {
87
>
// Convert first rune to upper and the rest to lower case
88
>
b.WriteString(cases.Title(language.AmericanEnglish).String(strings.ToLower(word)))
89
>
}
90
// Join them back into a single string
92
}
93