Documentation
¶
Overview ¶
Package caseconv provides text case conversion utilities.
Index ¶
- func Convert(s string, caseType CaseType) string
- func ConvertAll(s string) map[CaseType]string
- func RunCase(w io.Writer, args []string, opts Options) error
- func ToCamel(s string) string
- func ToConstant(s string) string
- func ToDot(s string) string
- func ToKebab(s string) string
- func ToLower(s string) string
- func ToPascal(s string) string
- func ToPath(s string) string
- func ToSentence(s string) string
- func ToSnake(s string) string
- func ToSwap(s string) string
- func ToTitle(s string) string
- func ToToggle(s string) string
- func ToUpper(s string) string
- type CaseType
- type ListResult
- type Options
- type Result
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertAll ¶
ConvertAll converts a string to all case types
Types ¶
type CaseType ¶
type CaseType string
CaseType represents the case convention
const ( CaseUpper CaseType = "upper" // UPPERCASE CaseLower CaseType = "lower" // lowercase CaseTitle CaseType = "title" // Title Case CaseSentence CaseType = "sentence" // Sentence case CaseCamel CaseType = "camel" // camelCase CasePascal CaseType = "pascal" // PascalCase CaseSnake CaseType = "snake" // snake_case CaseKebab CaseType = "kebab" // kebab-case CaseConstant CaseType = "constant" // CONSTANT_CASE CaseDot CaseType = "dot" // dot.case CasePath CaseType = "path" // path/case CaseSwap CaseType = "swap" // sWAP cASE CaseToggle CaseType = "toggle" // Toggle first char )
func ParseCaseType ¶
ParseCaseType parses a string into a CaseType
type ListResult ¶
ListResult represents multiple conversion results
Click to show internal directories.
Click to hide internal directories.