Help us shape the future of Go! Take the 2026 Go Developer Survey

string

package
v1.1.84 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2025 License: Apache-2.0 Imports: 6 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ToUpperCase converts the string to uppercase
	ToUpperCase = strings.ToUpper

	// ToLowerCase converts the string to lowercase
	ToLowerCase = strings.ToLower

	// Ord implements the default ordering for strings
	Ord = ord.FromStrictCompare[string]()

	// Join joins strings
	Join = F.Curry2(F.Bind2nd[[]string, string, string])(strings.Join)

	// Equals returns a predicate that tests if a string is equal
	Equals = F.Curry2(Eq)

	// Includes returns a predicate that tests for the existence of the search string
	Includes = F.Curry2(F.Swap(strings.Contains))
)
View Source
var Monoid = M.MakeMonoid(concat, "")

Monoid is the monoid implementing string concatenation

Functions

func Eq

func Eq(left string, right string) bool

func Format added in v1.0.7

func Format[T any](format string) func(t T) string

Format applies a format string to an arbitrary value

func IsEmpty

func IsEmpty(s string) bool

func IsNonEmpty

func IsNonEmpty(s string) bool

func Semigroup

func Semigroup() S.Semigroup[string]

func Size

func Size(s string) int

func ToBytes

func ToBytes(s string) []byte

func ToRunes added in v1.0.23

func ToRunes(s string) []rune

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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