Documentation ¶
Index ¶
- func Bool(val bool) string
- func Complex128(val complex128) string
- func Complex64(val complex64) string
- func DollarsAndCents(val float64) string
- func DollarsAndTenthsOfCents(val float64) string
- func DollarsMaxPrecision(val float64) string
- func EnsureBlankLineIfNotEmpty(str string) string
- func EnsurePrefix(str string, prefix string) string
- func EnsureSingleOccurrenceCharPrefix(str string, character string) string
- func EnsureSingleOccurrenceCharSuffix(str string, character string) string
- func EnsureSingleTrailingNewLine(str string) string
- func EnsureSuffix(str string, suffix string) string
- func EsIfPlural(count interface{}) string
- func Float32(val float32) string
- func Float64(val float64) string
- func HasPrefixAndSuffix(str string, substr string) bool
- func Indent(str string, indent string) string
- func Index(index int) string
- func Int(val int) string
- func Int16(val int16) string
- func Int32(val int32) string
- func Int64(val int64) string
- func Int64ToBase2Byte(size int64) string
- func Int8(val int8) string
- func IntToBase2Byte(size int) string
- func LastNChars(str string, n int) string
- func LastSplit(str string, chars string) string
- func LongestCommonPrefix(strs ...string) string
- func MaskString(str string, numPlain int) string
- func MaxLen(strs ...string) int
- func Obj(val interface{}) string
- func ObjFlat(val interface{}) string
- func ObjFlatNoQuotes(val interface{}) string
- func ObjStripped(val interface{}) string
- func ParseBool(valStr string) (bool, bool)
- func ParseFloat32(valStr string) (float32, bool)
- func ParseFloat64(valStr string) (float64, bool)
- func ParseInt(valStr string) (int, bool)
- func ParseInt16(valStr string) (int16, bool)
- func ParseInt32(valStr string) (int32, bool)
- func ParseInt64(valStr string) (int64, bool)
- func ParseInt8(valStr string) (int8, bool)
- func PluralCustom(singular string, plural string, count interface{}) string
- func PluralEs(str string, count interface{}) string
- func PluralS(str string, count interface{}) string
- func Round(val float64, decimalPlaces int, padToDecimalPlaces int) string
- func SIfPlural(count interface{}) string
- func StrIfPlural(str string, count interface{}) string
- func StrsAnd(strs []string) string
- func StrsOr(strs []string) string
- func StrsSentence(strs []string, lastJoinWord string) string
- func ToTitle(str string) string
- func TrimPrefixAndSuffix(str string, substr string) string
- func TrimPrefixIfPresentInAll(strs []string, prefix string) ([]string, bool)
- func TrimTrailingNewLines(str string) string
- func TrimTrailingWhitespace(str string) string
- func TruncateEllipses(str string, maxLength int) string
- func Uint(val uint) string
- func Uint16(val uint16) string
- func Uint32(val uint32) string
- func Uint64(val uint64) string
- func Uint8(val uint8) string
- func Uintptr(val uintptr) string
- func UserStr(val interface{}) string
- func UserStrStripped(val interface{}) string
- func UserStrValue(val reflect.Value) string
- func UserStrs(val interface{}) []string
- func UserStrsAnd(vals interface{}) string
- func UserStrsOr(vals interface{}) string
- func YesNo(val bool) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Complex128 ¶ added in v0.4.0
func Complex128(val complex128) string
func DollarsAndCents ¶ added in v0.13.0
func DollarsAndTenthsOfCents ¶ added in v0.13.0
func DollarsMaxPrecision ¶ added in v0.13.0
func EnsureBlankLineIfNotEmpty ¶ added in v0.17.0
func EnsurePrefix ¶ added in v0.4.0
func EnsureSingleOccurrenceCharPrefix ¶ added in v0.22.0
func EnsureSingleOccurrenceCharSuffix ¶ added in v0.22.0
func EnsureSingleTrailingNewLine ¶ added in v0.13.0
func EnsureSuffix ¶ added in v0.4.0
func EsIfPlural ¶ added in v0.20.0
func EsIfPlural(count interface{}) string
func HasPrefixAndSuffix ¶ added in v0.4.0
func Int64ToBase2Byte ¶ added in v0.19.0
func IntToBase2Byte ¶ added in v0.13.0
copied from https://yourbasic.org/golang/formatting-byte-size-to-human-readable-format/
func LastNChars ¶ added in v0.20.0
Returns the last n chars, or the entire string if the requested length is greater than the length of the string
func LastSplit ¶ added in v0.20.0
Returns the portion str after the last occurrance of chars, or the entire str if chars are not found
func LongestCommonPrefix ¶ added in v0.4.0
func MaskString ¶ added in v0.4.0
MaskString omits no more than half of the string
func ObjFlatNoQuotes ¶ added in v0.6.0
func ObjFlatNoQuotes(val interface{}) string
func ObjStripped ¶ added in v0.20.0
func ObjStripped(val interface{}) string
Same as Obj(), but trim leading and trailing quotes if it's just a string
func ParseFloat32 ¶ added in v0.4.0
func ParseFloat64 ¶ added in v0.4.0
func ParseInt16 ¶ added in v0.4.0
func ParseInt32 ¶ added in v0.4.0
func ParseInt64 ¶ added in v0.4.0
func PluralCustom ¶ added in v0.17.0
func StrIfPlural ¶ added in v0.20.0
func StrsSentence ¶ added in v0.4.0
func TrimPrefixAndSuffix ¶ added in v0.4.0
func TrimPrefixIfPresentInAll ¶ added in v0.4.0
func TrimTrailingNewLines ¶ added in v0.18.0
func TrimTrailingWhitespace ¶ added in v0.18.0
func TruncateEllipses ¶ added in v0.8.0
func UserStrStripped ¶ added in v0.4.0
func UserStrStripped(val interface{}) string
func UserStrValue ¶ added in v0.4.0
func UserStrsAnd ¶ added in v0.4.0
func UserStrsAnd(vals interface{}) string
func UserStrsOr ¶ added in v0.4.0
func UserStrsOr(vals interface{}) string
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.