/caseconv

Converting cases.

Primary LanguageGoMIT LicenseMIT

caseconv Codeship Status for minodisk/caseconv Go Report Card Coverage Status GoDoc MIT License

Converting cases.

Installation

go get github.com/minodisk/caseconv

Usage

caseconv.LowerCamelCase(`Obi-Wan "Ben" Kenobi`) // -> "obiWanBenKenobi"
caseconv.UpperCamelCase(`Obi-Wan "Ben" Kenobi`) // -> "ObiWanBenKenobi"
caseconv.SnakeCase(`Obi-Wan "Ben" Kenobi`)      // -> "Obi_Wan_Ben_Kenobi"
caseconv.LowerSnakeCase(`Obi-Wan "Ben" Kenobi`) // -> "obi_wan_ben_kenobi"
caseconv.UpperSnakeCase(`Obi-Wan "Ben" Kenobi`) // -> "OBI_WAN_BEN_KENOBI"
caseconv.Hyphens(`Obi-Wan "Ben" Kenobi`)        // -> "Obi-Wan-Ben-Kenobi"
caseconv.LowerHyphens(`Obi-Wan "Ben" Kenobi`)   // -> "obi-wan-ben-kenobi"
caseconv.UpperHyphens(`Obi-Wan "Ben" Kenobi`)   // -> "OBI-WAN-BEN-KENOBI"