changecase is a port of npm package change-case. It provides helpful various text conversion functions.
import "github.com/ku/go-change-case"
changecase.Camel("go-change-case") // returns "goChangeCase"
It contains following methods as original change-case does.
camel
goChangeCase
snake
go_change_case
pascal
GoChangeCase
param
go-change-case
dot
go.change.case
constant
GO_CHANGE_CASE
header
Go-Change-Case
path
go/change/case
sentence
Go change case
title
Go Change Case
no
go change case
lower
- alias for
strings.ToLower()
- alias for
upper
- alias for
strings.ToUpper()
- alias for
lcFirst
go-change-case
ucFirst
Go-change-case
swap
GO-CHANGE-CASE
isLower
- Returns true if all the letters in given string are in lower case.
isUpper
- Returns true if all the letters in given string are in upper case.