strings

package
v0.58.0-rc.0 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2021 License: Apache-2.0 Imports: 1 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EmptyIfNil

func EmptyIfNil(s *string) string

EmptyIfNil returns an empty string if the provided *string is nil, or else the value the provided pointer points to.

func HasPrefix

func HasPrefix(s, prefix string) bool

HasPrefix tests whether the string s begins with prefix.

func NilIfEmpty

func NilIfEmpty(s string) *string

NilIfEmpty returns nil if the provided string is empty, or else a pointer to the provided string.

func NilPointersArrayIfEmpty

func NilPointersArrayIfEmpty(in []*string) []*string

NilPointersArrayIfEmpty returns nil if the provided []*string array is empty, or the provided array otherwise.

func NilPointersMapIfEmpty

func NilPointersMapIfEmpty(in map[string]*string) map[string]*string

NilPointersMapIfEmpty returns nil if the provided map[string]*string is empty, or the provided map otherwise.

func Pointer

func Pointer(s string) *string

Pointer returns a pointer to the provided string.

func ToPointersArray

func ToPointersArray(in []string) []*string

ToPointersArray converts the provided []string into a []*string.

func ToPointersMap

func ToPointersMap(in map[string]string) map[string]*string

ToPointersMap converts the provided map[string]string into a map[string]*string.

func ToValuesArray

func ToValuesArray(in []*string) []string

ToValuesArray converts the provided []*string into a []string.

func ToValuesMap

func ToValuesMap(in map[string]*string) map[string]string

ToValuesMap converts the provided map[string]*string into a map[string]string.

Types

This section is empty.

Jump to

Keyboard shortcuts

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