helper

package
v0.0.0-...-0efc7b6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 13, 2024 License: Unlicense Imports: 6 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ArrayDiffInt

func ArrayDiffInt(array1 []int, arrayOthers ...[]int) []int

func ArrayUnshift

func ArrayUnshift(s []string, elements ...string) []string

unshift a string from array

func Implode

func Implode(glue string, values []string) string

equivalent of php implode()

func InsertNth

func InsertNth(s string, n int, insert rune) string

func InsertTagsIgnoringNewLines

func InsertTagsIgnoringNewLines(oldMessage string, newMessage string, tags []formatter.TagPos) string

func IsStringSliceEqual

func IsStringSliceEqual(a, b []string) bool

compare byte by byte a string to another

func Map

func Map(strings []string, function func(string) string) []string

func MaxInt

func MaxInt(list []int) int

func RangeInt

func RangeInt(start int, end int) []int

func RemoveDecoration

func RemoveDecoration(outputFormatter formatter.OutputFormatterInterface, message string) string

remove all string decoration (tags)

func StrSplit

func StrSplit(data string, length int) []string

func Strlen

func Strlen(s string) int

func StrlenWithoutDecoration

func StrlenWithoutDecoration(outputFormatter formatter.OutputFormatterInterface, message string) int

length of an undecorated string

func Wordwrap

func Wordwrap(message string, width int, breaker rune) string

TODO this func as be stolen for a random repo (yep im an horrible person). Extremely disgusting, Need refactoring

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL