strings

package
v1.3.6 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InSlice

func InSlice(a string, list []string) bool

InSlice returns true if the string is in the slice

func MaybeRemoveQuotes

func MaybeRemoveQuotes(s string) string

MaybeRemoveQuotes removes the quotes from the string if it begins and ends with them.

func RandomString

func RandomString(n int) string

RandomString returns a pseudorandom string of length n. It is safe to use this function in concurrent environments. Implementation from https://stackoverflow.com/a/31832326

func ValidHex

func ValidHex(x byte) bool

ValidHex returns true if the byte is a valid hex character

func WrapUnsafe

func WrapUnsafe(buf []byte) string

WrapUnsafe wraps the provided buffer as a string. The buffer must not be mutated after calling this function.

func X2c

func X2c(what string) byte

X2c converts a hex character to its ascii value

Types

This section is empty.

Jump to

Keyboard shortcuts

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