strings

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2020 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnumJoin

func EnumJoin(strings []string) string

EnumJoin joins a string slice into a human-readable enumeration, so a [1, 2, 3] slice becomes a "1, 2 and 3" string.

func Map

func Map(strings []string, mapfn StringMapFn) []string

Map creates a new string slice by applying mapfn to strings.

func RxMatches

func RxMatches(s string, rx *regexp.Regexp) map[string]string

RxMatches returns a map of named capture groups.

Types

type SIMap

type SIMap map[string]interface{}

SIMap is a string-interface map.

func (SIMap) Keys

func (m SIMap) Keys() []string

Keys returns a slice containing keys of m.

type StringMapFn

type StringMapFn = func(string) string

StringMapFn is a function to map strings to strings.

Jump to

Keyboard shortcuts

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