Documentation ¶
Index ¶
- Variables
- func Coalesce(str ...string) string
- func DefaultIfEmpty(s string, defaultValue string) stringdeprecated
- func GetPointer(s string) *stringdeprecated
- func Splitx(s, sep string) []string
- func ToLowerInitial(s string) string
- func ToUpperInitial(s string) string
- func TruncateByteLen(s string, length int) string
- type RegisteredCases
- type RegisteredPrefixes
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrUnknownCase = errUnknownCase{} ErrUnknownPrefix = errUnknownPrefix{} )
Functions ¶
func DefaultIfEmpty
deprecated
added in
v0.0.358
func GetPointer
deprecated
added in
v0.0.464
func Splitx ¶
Splitx is a special case of strings.Split which returns an empty slice if the string is empty
func ToLowerInitial ¶ added in v0.0.38
ToLowerInitial converts a string's first character to lower case.
func ToUpperInitial ¶ added in v0.0.38
ToUpperInitial converts a string's first character to upper case.
func TruncateByteLen ¶ added in v0.0.473
TruncateByteLen returns string truncated at the end with the length specified
Types ¶
type RegisteredCases ¶ added in v0.0.167
type RegisteredCases struct {
// contains filtered or unexported fields
}
func SwitchExact ¶ added in v0.0.271
func SwitchExact(actual string) *RegisteredCases
func (*RegisteredCases) AddCase ¶ added in v0.0.167
func (r *RegisteredCases) AddCase(cases ...string) bool
func (*RegisteredCases) String ¶ added in v0.0.168
func (r *RegisteredCases) String() string
func (*RegisteredCases) ToUnknownCaseErr ¶ added in v0.0.168
func (r *RegisteredCases) ToUnknownCaseErr() error
type RegisteredPrefixes ¶ added in v0.0.271
type RegisteredPrefixes struct {
// contains filtered or unexported fields
}
func SwitchPrefix ¶ added in v0.0.271
func SwitchPrefix(actual string) *RegisteredPrefixes
func (*RegisteredPrefixes) HasPrefix ¶ added in v0.0.271
func (r *RegisteredPrefixes) HasPrefix(prefixes ...string) bool
func (*RegisteredPrefixes) String ¶ added in v0.0.271
func (r *RegisteredPrefixes) String() string
func (*RegisteredPrefixes) ToUnknownPrefixErr ¶ added in v0.0.271
func (r *RegisteredPrefixes) ToUnknownPrefixErr() error
Click to show internal directories.
Click to hide internal directories.