strings

package
v1.1.56 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2023 License: Unlicense Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Delimit added in v1.1.14

func Delimit[C constraints.Integer](s string, sep string, count C) string

Delimit creates a list of count values of s separated by count - 1 values of sep. Note that this function will panic if count is 0 or if the result of ((len(s) + len(sep)) * count) overflows.

func IsEmpty

func IsEmpty[S ~string](value S) bool

IsEmpty returns true if the string is nil or empty but will return false otherwise

func ModifyAndJoin added in v1.1.4

func ModifyAndJoin[S ~string](applier func(string) string, separator string, items ...S) string

ModifyAndJoin applies a modifier function to each string in the list submitted to the function and then joins them all together using separator

func Quote added in v1.1.4

func Quote[S ~string](inner S, quote string) string

Quote creates a string from an inner string by adding quote strings before and after

Types

This section is empty.

Jump to

Keyboard shortcuts

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