Documentation ¶
Index ¶
- func CapitalizeFirstLetterEveryWord(text string) string
- type PluralString
- func (s PluralString) MarshalJSON() ([]byte, error)
- func (s PluralString) MarshalText() ([]byte, error)
- func (s PluralString) Singular() SingularString
- func (s PluralString) String() string
- func (s *PluralString) UnmarshalJSON(bytes []byte) error
- func (s *PluralString) UnmarshalText(text []byte) error
- type PluralStrings
- type SingularString
- func (s SingularString) MarshalJSON() ([]byte, error)
- func (s SingularString) MarshalText() ([]byte, error)
- func (s SingularString) Plural() PluralString
- func (s SingularString) String() string
- func (s *SingularString) UnmarshalJSON(bytes []byte) error
- func (s *SingularString) UnmarshalText(text []byte) error
- type SingularStrings
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type PluralString ¶
type PluralString struct {
// contains filtered or unexported fields
}
PluralString imposes plural form on a word conforming to English rules. It is capable of self conversion to singular form. You can use it as keys in maps, values, and it knows how to Marshal itself like a string. Unmarshalling will apply plural formating.
func NewPluralString ¶
func NewPluralString(str string) PluralString
func (PluralString) MarshalJSON ¶
func (s PluralString) MarshalJSON() ([]byte, error)
func (PluralString) MarshalText ¶
func (s PluralString) MarshalText() ([]byte, error)
func (PluralString) Singular ¶
func (s PluralString) Singular() SingularString
func (PluralString) String ¶
func (s PluralString) String() string
func (*PluralString) UnmarshalJSON ¶
func (s *PluralString) UnmarshalJSON(bytes []byte) error
func (*PluralString) UnmarshalText ¶
func (s *PluralString) UnmarshalText(text []byte) error
type PluralStrings ¶
type PluralStrings []PluralString
func NewPluralStrings ¶
func NewPluralStrings(list []string) PluralStrings
func (PluralStrings) Singular ¶
func (s PluralStrings) Singular() SingularStrings
type SingularString ¶
type SingularString struct {
// contains filtered or unexported fields
}
SingularString imposes singular form on a word conforming to English rules. It is capable of self conversion to plural form. You can use it as keys in maps, values, and it knows how to Marshal itself like a string. Unmarshalling will apply singular formating.
func NewSingularString ¶
func NewSingularString(str string) SingularString
func (SingularString) MarshalJSON ¶
func (s SingularString) MarshalJSON() ([]byte, error)
func (SingularString) MarshalText ¶
func (s SingularString) MarshalText() ([]byte, error)
func (SingularString) Plural ¶
func (s SingularString) Plural() PluralString
func (SingularString) String ¶
func (s SingularString) String() string
func (*SingularString) UnmarshalJSON ¶
func (s *SingularString) UnmarshalJSON(bytes []byte) error
func (*SingularString) UnmarshalText ¶
func (s *SingularString) UnmarshalText(text []byte) error
type SingularStrings ¶
type SingularStrings []SingularString
func NewSingularStrings ¶
func NewSingularStrings(list []string) SingularStrings
func (SingularStrings) Plural ¶
func (s SingularStrings) Plural() PluralStrings
Click to show internal directories.
Click to hide internal directories.