We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents e9e00a9 + aa5d233 commit 19270afCopy full SHA for 19270af
utils/stringutil/strings.go
@@ -270,3 +270,23 @@ func CamelCaseToSpaceSeparated(input string) string {
270
}
271
return string(result)
272
273
+
274
+// UpperFirst upper the first letter of the input string
275
+func UpperFirst(input string) string {
276
+ if len(input) == 0 {
277
+ return input
278
+ }
279
+ runes := []rune(input)
280
+ runes[0] = unicode.ToUpper(runes[0])
281
+ return string(runes)
282
+}
283
284
+// LowerFirst lower the first letter of the input string
285
+func LowerFirst(input string) string {
286
287
288
289
290
+ runes[0] = unicode.ToLower(runes[0])
291
292
0 commit comments