Documentation

Overview

Package stringx contains utilities for working with strings. It complements the standard "strings" package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AnyValue

func AnyValue(m map[string]string) string

AnyValue returns a value of a map[string]string. Panics if the map is empty.

func FromBytes

func FromBytes(b []byte) string

FromBytes converts a byte slice to a string.

func Keys

func Keys(m map[string]string) []string

Keys returns the domain of a map[string]string.

func SingleValue

func SingleValue(m map[string]string) string

SingleValue returns the single value of a map[string]string. Panics if the map does not contain exactly one value.

func ToBytes

func ToBytes(s string) []byte

ToBytes converts a string to a byte slice.

func Values

func Values(m map[string]string) []string

Values returns the values of a map[string]string.

Types

This section is empty.

Source Files