stringx

package
v2.24.0-RC1+incompatible Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2020 License: Apache-2.0 Imports: 0 Imported by: 0

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.

Jump to

Keyboard shortcuts

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