Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Contains ¶
func Contains[T comparable](s []T, e T) bool
Contains searches for an element in a slice and returns true if found Source: https://stackoverflow.com/a/70802740/5516320
func RandomStrings ¶ added in v0.5.9
RandomStrings generates a slice of random strings with the given length. The strings are generated by Str.Random. The length of each string is increasing by (i+1/2) with i being the passed length.
func RandomStringsLen ¶ added in v0.5.9
RandomStringsLen generates a slice of strings with the given length lenSlice. The strings are generated by Str.Random. The length of each string is defined by the passed lenString. This makes it possible to generate a slice of letters: Example: RandomStringsLen(5, 1) -> ["a", "c", "e", "g", "i"] or a slice of strings with the same length: Example: RandomStringsLen(5, 3) -> ["gea", "brv", "pgd", "qwo", "cie"]
Types ¶
This section is empty.