strings

package
v0.0.0-...-540bb61 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompareStringArray

func CompareStringArray(a, b []string) bool

func CompareStringPointers

func CompareStringPointers(a, b *string) bool

func CompareStrings

func CompareStrings(a, b string) bool

func DiffStrings

func DiffStrings(compareWhat, compareTo []string) []string

DiffStrings returns the elements in `compareWhat` that are not in `compareTo` and elements in `compareTo` that are not in `compareFrom`.

func DiffStringsOneWay

func DiffStringsOneWay(compareWhat, compareTo []string) []string

DiffStringsOneWay returns the elements in `compareWhat` that are not in `compareTo`.

func Join

func Join(elems []string, sep string) string

Join concatenates the elements of its first argument to create a single string. The separator string sep is placed between elements in the resulting string.

func PrefixStringArray

func PrefixStringArray(a []string, prefix string) []string

func Split

func Split(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 1 whose only element is s.

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.

To split around the first instance of a separator, see Cut.

func Title

func Title(in string) string

Title returns string in Title format

func ToLower

func ToLower(s string) string

ToLower returns s with all Unicode letters mapped to their lower case.

Types

This section is empty.

Jump to

Keyboard shortcuts

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