strings

package
v0.0.82 Latest Latest
Warning

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

Go to latest
Published: May 30, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetStringOrFallback

func GetStringOrFallback(values ...string) string

func RemoveEmpty added in v0.0.52

func RemoveEmpty(s []string) []string

func Replace added in v0.0.53

func Replace(s string, old string, news []interface{}, useQuote bool, n int) string

func ReplaceAll added in v0.0.53

func ReplaceAll(s, old string, news []interface{}, useQuote bool) string

func SliceContains added in v0.0.61

func SliceContains(list []string, target string, caseSensitive bool) bool

func SliceContainsCaseInSensitive added in v0.0.75

func SliceContainsCaseInSensitive(list []string, target string) bool

sliceContains reports whether the provided string is present in the given slice of strings.

func SliceIntersection added in v0.0.29

func SliceIntersection(s1 []string, s2 []string) []string

func SliceUnique added in v0.0.29

func SliceUnique(s ...string) []string

func SplitOmitEmpty added in v0.0.80

func SplitOmitEmpty(s, sep string) []string

Split slices s into all substrings separated by sep and returns a slice of the substrings between those separators.

If s does not contain sep and sep is not empty, Split returns a slice of length 0.

If sep is empty, Split splits after each UTF-8 sequence. If both s and sep are empty, Split returns an empty slice.

It is equivalent to SplitN with a count of -1.

Types

This section is empty.

Jump to

Keyboard shortcuts

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