stringutil

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2015 License: MIT, MIT Imports: 2 Imported by: 0

README

stringutil Build Status

Installation

go get -u github.com/naoina/go-stringutil

Documentation

See https://godoc.org/github.com/naoina/go-stringutil

License

MIT

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ToSnakeCase

func ToSnakeCase(s string) string

ToSnakeCase returns a copy of the string s with all Unicode letters mapped to their snake case. It will insert letter of '_' at position of previous letter of uppercase and all letters convert to lower case.

func ToSnakeCaseASCII

func ToSnakeCaseASCII(s string) string

ToSnakeCaseASCII is similar to ToSnakeCase, but optimized for only the ASCII characters. ToSnakeCaseASCII is faster than ToSnakeCase, but doesn't work correctly if contains non-ASCII characters.

func ToUpperCamelCase

func ToUpperCamelCase(s string) string

ToUpperCamelCase returns a copy of the string s with all Unicode letters mapped to their camel case. It will convert to upper case previous letter of '_' and first letter, and remove letter of '_'.

func ToUpperCamelCaseASCII

func ToUpperCamelCaseASCII(s string) string

ToUpperCamelCaseASCII is similar to ToUpperCamelCase, but optimized for only the ASCII characters. ToUpperCamelCaseASCII is faster than ToUpperCamelCase, but doesn't work if contains non-ASCII characters.

Types

This section is empty.

Jump to

Keyboard shortcuts

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