feat: add UpperCamelCase

This commit is contained in:
dudaodong committed 2026-02-24 17:15:30 +08:00
1 parent b252b415fa
commit de682f2214
5 files changed
+58 -2

No files matched your search

+15
View File
@@ -94,6 +94,21 @@ func ExampleCamelCase() {
// foo11Bar
}
func ExampleUpperCamelCase() {
strings := []string{"", "foobar", "&FOO:BAR$BAZ", "$foo%", "Foo-#1😄$_%^&*(1bar"}
for _, v := range strings {
s := UpperCamelCase(v)
fmt.Println(s)
}
// Output:
//
// Foobar
// FooBarBaz
// Foo
// Foo11Bar
}
func ExampleCapitalize() {
strings := []string{"", "Foo", "_foo", "fooBar", "foo-bar"}