slicesutils

package
v0.448.0 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddPrefixToEachString

func AddPrefixToEachString(stringSlices []string, prefix string) (output []string)

func AddSuffixToEachString

func AddSuffixToEachString(stringSlices []string, suffix string) (output []string)

func AtLeastOneElementStartsWith

func AtLeastOneElementStartsWith(elements []string, toCheck string) (atLeastOneElementStartsWith bool)

func ByteSlicesEqual

func ByteSlicesEqual(input1 []byte, input2 []byte) (slicesEqual bool)

func ContainsAllStrings

func ContainsAllStrings(input []string, toCheck []string) (containsAllStrings bool)

func ContainsEmptyString

func ContainsEmptyString(input []string) (containsEmptyString bool)

func ContainsInt

func ContainsInt(intSlice []int, intToSearch int) (containsInt bool)

func ContainsNoEmptyStrings

func ContainsNoEmptyStrings(input []string) (containsNoEmptyString bool)

func ContainsOnlyUniqeStrings

func ContainsOnlyUniqeStrings(input []string) (containsOnlyUniqeStrings bool)

func ContainsString

func ContainsString(sliceOfStrings []string, toCheck string) (contains bool)

func ContainsStringIgnoreCase

func ContainsStringIgnoreCase(sliceOfStrings []string, toCheck string) (contains bool)

func CountStrings

func CountStrings(input []string, toSearch string) (count int)

func DiffStringSlices

func DiffStringSlices(a []string, b []string) (aNotInB []string, bNotInA []string)

func GetDeepCopyOfByteSlice

func GetDeepCopyOfByteSlice(input []byte) (deepCopy []byte)

func GetDeepCopyOfStringsSlice

func GetDeepCopyOfStringsSlice(sliceOfStrings []string) (deepCopy []string)

func GetInitializedIntSlice added in v0.423.0

func GetInitializedIntSlice(nValues int, initValue int) []int

func GetInitializedIntSliceWithZeros added in v0.423.0

func GetInitializedIntSliceWithZeros(nValues int) (initializedSlice []int)

func GetSortedDeepCopyOfStringsSlice

func GetSortedDeepCopyOfStringsSlice(sliceOfStrings []string) (sorted []string)

func GetStringElementsNotInOtherSlice

func GetStringElementsNotInOtherSlice(toCheck []string, other []string) (elementsNotInOther []string)

func MaxIntValuePerIndex

func MaxIntValuePerIndex(intSlice1 []int, intSlice2 []int) (maxValues []int)

func RemoveDuplicatedStrings

func RemoveDuplicatedStrings(sliceOfStrings []string) (cleaned []string)

func RemoveEmptyStrings

func RemoveEmptyStrings(sliceOfStrings []string) (sliceOfStringsWithoutEmptyStrings []string)

func RemoveEmptyStringsAtEnd

func RemoveEmptyStringsAtEnd(input []string) (withoutEmptyStringsAtEnd []string)

func RemoveLastElementIfEmptyString

func RemoveLastElementIfEmptyString(sliceOfStrings []string) (cleanedUp []string)

func RemoveMatchingStrings

func RemoveMatchingStrings(sliceToRemoveMatching []string, matchingStringToRemove string) (cleanedUpSlice []string)

func RemoveString

func RemoveString(elements []string, toRemove string) (cleanedUpElements []string)

func RemoveStringEntryAtIndex

func RemoveStringEntryAtIndex(elements []string, indexToRemove int) (elementsWithIndexRemoved []string)

func RemoveStringsWhichContains

func RemoveStringsWhichContains(sliceToRemoveStringsWhichContains []string, searchString string) (cleanedUpSlice []string, err error)

func SortStringSliceAndRemoveDuplicates

func SortStringSliceAndRemoveDuplicates(input []string) (output []string)

func SortStringSliceAndRemoveEmpty

func SortStringSliceAndRemoveEmpty(input []string) (sortedAndWithoutEmptyStrings []string)

func SplitStrings

func SplitStrings(input []string, splitAt string) (splitted []string)

func SplitStringsAndRemoveEmpty

func SplitStringsAndRemoveEmpty(input []string, splitAt string) (splitted []string)

func StringSlicesEqual

func StringSlicesEqual(input1 []string, input2 []string) (slicesEqual bool)

func ToLower

func ToLower(input []string) (lower []string)

func TrimAllPrefix

func TrimAllPrefix(sliceOfStrings []string, prefixToRemove string) (sliceOfStringsWithPrefixRemoved []string)

func TrimPrefix

func TrimPrefix(sliceOfStrings []string, prefixToRemove string) (sliceOfStringsWithPrefixRemoved []string)

func TrimSpace

func TrimSpace(toTrim []string) (trimmed []string)

Types

This section is empty.

Jump to

Keyboard shortcuts

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