stringx

package
v2.35.0-RC1 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2021 License: Apache-2.0, BSD-3-Clause, MIT 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