ustrings

package
v0.44.0 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2026 License: Apache-2.0 Imports: 2 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	ConjunctionDefault      = "and"
	SeparatorDefault        = ","
	WrappersDefault         = Empty
	EmptyListMessageDefault = ""
)

Variables

This section is empty.

Functions

func OxfordizeList

func OxfordizeList(elements []string, options ...OxfordOptions) string

func ParseFlags

func ParseFlags(expression string) (map[string]string, error)

ParseFlags - convert command line flags to a map of keys to strings.

func TrimQuotes

func TrimQuotes(input string) string

TrimQuotes - given an input string, remove one layer of surrounding quotes if they exist.

func WrapString

func WrapString(input string, wrappers WrapOption) string

Types

type OxfordConfigs

type OxfordConfigs struct {
	// contains filtered or unexported fields
}

type OxfordOptions

type OxfordOptions func(config *OxfordConfigs)

func WithConjunction

func WithConjunction(conjunction string) OxfordOptions

func WithEmptyListMessage

func WithEmptyListMessage(message string) OxfordOptions

func WithInnerWrappers

func WithInnerWrappers(wrappers WrapOption) OxfordOptions

func WithOuterWrappers

func WithOuterWrappers(wrappers WrapOption) OxfordOptions

func WithSeparator

func WithSeparator(separator string) OxfordOptions

type WrapOption

type WrapOption int
const (
	Empty WrapOption = iota
	SingleQuotes
	DoubleQuotes
	TackQuotes
	Parentheses
	SquareBrackets
	AngleBrackets
)

Jump to

Keyboard shortcuts

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