str

package
v0.0.0-...-6d13c91 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: Apache-2.0 Imports: 8 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Cast

func Cast(i interface{}) (string, error)

Cast missing godoc

func CastOrEmpty

func CastOrEmpty(i interface{}) string

CastOrEmpty casts the given value to string and returns the empty string otherwise

func CastToBool

func CastToBool(i interface{}) (bool, error)

CastToBool casts the given value to string and then parsers it to a bool value

func ContainsInSlice

func ContainsInSlice(s []string, str string) bool

ContainsInSlice checks if a string value is present in a given slice

func MapToSlice

func MapToSlice(set map[string]struct{}) []string

MapToSlice missing godoc

func Matches

func Matches(actual []string, required []string) bool

Matches missing godoc

func NewNullString

func NewNullString(s string) sql.NullString

NewNullString missing godoc

func PrefixStrings

func PrefixStrings(in []string, prefix string) []string

PrefixStrings missing godoc

func Ptr

func Ptr(s string) *string

Ptr missing godoc

func PtrStrToStr

func PtrStrToStr(s *string) string

PtrStrToStr missing godoc

func SliceToMap

func SliceToMap(in []string) map[string]struct{}

SliceToMap missing godoc

func StringifyJSONRawMessage

func StringifyJSONRawMessage(rawMessage json.RawMessage) *string

StringifyJSONRawMessage if the rawMessage contains value returns it, otherwise return nil

func Title

func Title(s string) string

Title missing godoc

func Unique

func Unique(in []string) []string

Unique missing godoc

func ValueIn

func ValueIn(value string, in []string) bool

ValueIn checks if the provided value is part of the provided string slice

Types

This section is empty.

Jump to

Keyboard shortcuts

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