Documentation
¶
Index ¶
- func AddCharAround(target string, char rune) string
- func ContainsAny[K comparable](arrA []K, arrB []K) bool
- func FilterElementsMatchingCondition[V CompatibleArrayTypes](inputArr [][]V, matchFunc func(V) bool) [][]V
- func GetBigEndianBytes(data interface{}) []byte
- func GetCorrectEndianBytes(data interface{}) []byte
- func GetCorrectEndianTimestamp(leastSignificantBytes []byte) uint64
- func GetCorrectEndianUint32(bs []byte) uint32
- func GetCorrectEndianUint64(bs []byte) uint64
- func GetLittleEndianBytes(data interface{}) []byte
- func GetLowerChars(s string) string
- func GetUpperChars(s string) string
- func IndexOf[K comparable](target K, array []K) int
- func IndexesOf[K comparable](target K, array []K) []int
- func RemoveCharsIn(target string, cutset string) string
- func RemoveEmptyStrings(targets []string) []string
- func RemoveRowsColumnsAtIndexes[V CompatibleArrayTypes](rowIndexesToRemove, columnIndexesToRemove []int, inputArr [][]V) [][]V
- func ReplaceCharactersMatchingCondition(target string, matchFunc func(r rune) bool, replaceWith string, ...) string
- func TrimCharsAround(target string, cutset string, trimUntilNoChange bool) string
- func TrimWhitespaceAround(target string, trimUntilNoChange bool) string
- func TrimWhitespaceAroundStrings(targets []string) []string
- type CompatibleArrayTypes
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddCharAround ¶
AddCharAround adds `char` before and after `target`
func ContainsAny ¶
func ContainsAny[K comparable](arrA []K, arrB []K) bool
ContainsAny, returns if ANY elements from arrA exist in arrB
func FilterElementsMatchingCondition ¶
func FilterElementsMatchingCondition[V CompatibleArrayTypes](inputArr [][]V, matchFunc func(V) bool) [][]V
FilterElementsMatchingCondition, removes any elements from `inputArr` that return "true" from `matchFunc`
func GetBigEndianBytes ¶
func GetBigEndianBytes(data interface{}) []byte
func GetCorrectEndianBytes ¶
func GetCorrectEndianBytes(data interface{}) []byte
func GetCorrectEndianUint32 ¶
func GetCorrectEndianUint64 ¶
func GetLittleEndianBytes ¶
func GetLittleEndianBytes(data interface{}) []byte
func GetLowerChars ¶
func GetUpperChars ¶
func IndexOf ¶
func IndexOf[K comparable](target K, array []K) int
IndexOf returns the FIRST occurrence of `target` in `array`
NOTE: Use `IndexesOf` to return ALL occurrences
func IndexesOf ¶
func IndexesOf[K comparable](target K, array []K) []int
IndexesOf return every index where `target` exists in `array`
func RemoveCharsIn ¶
RemoveCharsIn removes any chars from `cutset` in `target`
func RemoveEmptyStrings ¶
Removes any empty strings found in `targets`
func RemoveRowsColumnsAtIndexes ¶
func RemoveRowsColumnsAtIndexes[V CompatibleArrayTypes](rowIndexesToRemove, columnIndexesToRemove []int, inputArr [][]V) [][]V
RemoveRowColumnsAtIndexes, removes rows and/or columns, at their specified indexes from the 2D `inputArr`
func TrimCharsAround ¶
TrimCharsAround trims any chars found in `cutset` from `target`
if `trimUntilNoChange` is true, continues trimming until the string stops changing
func TrimWhitespaceAround ¶
TrimWhitespaceAround trims any whitespace around `target`
if `trimUntilNoChange` is true, continues trimming until the string stops changing
func TrimWhitespaceAroundStrings ¶
Removes all whitespace around a list of strings
Types ¶
type CompatibleArrayTypes ¶
type CompatibleArrayTypes interface {
string | interface{}
}