Documentation
¶
Index ¶
- func BasicWordWrap(input string, maxChars int) (output string)
- func CeilF2I(v float64) int
- func ClampF(value, min, max float64) float64
- func ClampI(value, min, max int) int
- func CleanCRLF(s string) string
- func DistInts(max int, in []int) (out []int)
- func Distribute(total, available, parts, nChildren, spacing int) (values, gaps []int, err error)
- func EqInts(a, b []int) (same bool)
- func FileWritable(path string) (writable bool)
- func FloorI(v, min int) int
- func HasBit(v, b uint64) bool
- func HasSpace(text string) bool
- func IsDir(path string) (found bool)
- func IsEmpty(text string) bool
- func IsFalse(text string) bool
- func IsFile(path string) (found bool)
- func IsTrue(text string) bool
- func IsUrl(str string) (isUrl bool)
- func LexicographicLess(i, j string) bool
- func MakeDir(path string, perm os.FileMode) error
- func NLSprintf(format string, argv ...interface{}) string
- func PadLeft(src, pad string, length int) string
- func PadRight(src, pad string, length int) string
- func ReadFile(path string) (content string, err error)
- func RotateSlice(a []interface{}, rotation int) (rotated []interface{})
- func SolveSpaceAlloc(nChildren, nSpace, minSpacing int) (increment int, gaps []int)
- func StringSliceHasValue(slice []string, value string) (has bool)
- func StripTags(input string) (output string)
- func SumInts(ints []int) (sum int)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BasicWordWrap ¶ added in v0.0.5
basic word wrapping utility method
func CeilF2I ¶
Round the given floating point number to the nearest larger integer and return that as an integer.
func ClampF ¶ added in v0.0.4
Returns the `value` given unless it's smaller than `min` or greater than `max`. If it's less than `min`, `min` is returned and if it's greater than `max` it returns max.
func ClampI ¶
Returns the `value` given unless it's smaller than `min` or greater than `max`. If it's less than `min`, `min` is returned and if it's greater than `max` it returns max.
func Distribute ¶
func FileWritable ¶
func FloorI ¶
Returns the `value` given unless it's less than `min`, in which case it returns `min`.
func LexicographicLess ¶
func RotateSlice ¶ added in v0.0.4
func RotateSlice(a []interface{}, rotation int) (rotated []interface{})
func SolveSpaceAlloc ¶
func StringSliceHasValue ¶ added in v0.0.5
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.