strcase

package module
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 14, 2017 License: BSD-3-Clause Imports: 1 Imported by: 473

README

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")

Documentation

Overview

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.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func KebabCase

func KebabCase(s string) string

KebabCase converts a string into kebab case.

func LowerCamelCase

func LowerCamelCase(s string) string

LowerCamelCase converts a string into camel case starting with a lower case letter.

func SnakeCase

func SnakeCase(s string) string

SnakeCase converts a string into snake case.

func UpperCamelCase

func UpperCamelCase(s string) string

UpperCamelCase converts a string into camel case starting with a upper case letter.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL