Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CaseFormat ¶
type CaseFormat string
CaseFormat defines case format
const ( CaseFormatUndefined = "" CaseFormatUpper CaseFormat = "upper" CaseFormatLower CaseFormat = "lower" CaseFormatUpperCamel CaseFormat = "upperCamel" CaseFormatLowerCamel CaseFormat = "lowerCamel" CaseFormatTitle CaseFormat = "title" CaseFormatSentence CaseFormat = "sentence" CaseFormatUpperUnderscore CaseFormat = "upperUnderscore" CaseFormatLowerUnderscore CaseFormat = "lowerUnderscore" CaseFormatDash CaseFormat = "dash" CaseFormatLowerDash CaseFormat = "lowerdash" CaseFormatUpperDash CaseFormat = "upperdash" )
func DetectCaseFormat ¶
func DetectCaseFormat(words ...string) CaseFormat
func NewCaseFormat ¶
func NewCaseFormat(name string) CaseFormat
func (CaseFormat) Format ¶
func (c CaseFormat) Format(text string, caseFormat CaseFormat) string
Format formats text
func (CaseFormat) Index ¶
func (c CaseFormat) Index() int
func (CaseFormat) IsDefined ¶
func (c CaseFormat) IsDefined() bool
IsDefined returns true if case format is defined
func (CaseFormat) To ¶
func (c CaseFormat) To(to CaseFormat) *CaseFormatter
type CaseFormatter ¶
type CaseFormatter struct {
// contains filtered or unexported fields
}
CaseFormatter defines words case formatter
func (*CaseFormatter) Format ¶
func (c *CaseFormatter) Format(src string) string
Format converts source to desired case format
func (*CaseFormatter) To ¶
func (c *CaseFormatter) To() CaseFormat
Click to show internal directories.
Click to hide internal directories.