stringutil

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2022 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SplitWithEscape

func SplitWithEscape(s string, split uint8, escape uint8, trim bool) []string

SplitWithEscape behaves like strings.Split but supports defining an escape character. E.g, when using ',' as split separator and '\' es escape code, the string "1\,2,3," will not be split into ["1, 2", "3"].

func StringOrDefault

func StringOrDefault(val string, defaultStr string) string

Types

type StringSet

type StringSet map[string]struct{}

func (*StringSet) Add

func (s *StringSet) Add(v string)

func (StringSet) Contains

func (s StringSet) Contains(v string) bool

func (StringSet) Keys

func (s StringSet) Keys() []string

Jump to

Keyboard shortcuts

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