stringutil

package module
Version: v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2015 License: MIT Imports: 5 Imported by: 47

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 AddCommonInitialism

func AddCommonInitialism(ss ...string)

AddCommonInitialism adds ss to list of common initialisms.

func DelCommonInitialism

func DelCommonInitialism(ss ...string)

DelCommonInitialism deletes ss from list of common initialisms.

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. ToSnakeCase does not insert '_' letter into a common initialism word like ID, URL and so on.

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.

Source Files

Jump to

Keyboard shortcuts

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