Handle trailing upper case letters correctly
3 files changed
tree: 953ca1fafd20a151d7503132a6d35c48b94ca215
  1. .gitignore
  2. .travis.yml
  3. camel.go
  4. camel_test.go
  5. doc.go
  6. helper.go
  7. kebab.go
  8. kebab_test.go
  10. README.md
  11. snake.go
  12. snake_test.go

Build Status Coverage Status GoDoc

Go strcase

The package strcase converts between different kinds of naming formats such as camel case (CamelCase), snake case (snake_case) or kebab case (kebab-case). The package is designed to work only with strings consisting of standard ASCII letters. Unicode is currently not supported.

Versioning and stability

Although the master branch is supposed to remain always backward compatible, the repository contains version tags in order to support vendoring tools such as glide. The tag names follow semantic versioning conventions and have the following format v1.0.0.

Install and use

go get -u github.com/stoewer/go-strcase
import "github.com/stoewer/go-strcase"

var snake = strcase.SnakeCase("CamelCase")