string

package
v2.0.4 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2025 License: Apache-2.0 Imports: 6 Imported by: 10 modules, 6 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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.Bind2of2(strings.Contains)

	// HasPrefix returns a predicate that checks if the prefis is included in the string
	HasPrefix = F.Bind2of2(strings.HasPrefix)
)
View Source
var Monoid = M.MakeMonoid(concat, "")

Monoid is the monoid implementing string concatenation

View Source
var Semigroup = S.MakeSemigroup(concat)

Functions

func Eq

func Eq(left, right string) bool

func Format

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

Format applies a format string to an arbitrary value

func Intersperse

func Intersperse(middle string) func(string, string) string

func IntersperseMonoid

func IntersperseMonoid(middle string) M.Monoid[string]

func IntersperseSemigroup

func IntersperseSemigroup(middle string) S.Semigroup[string]

func IsEmpty

func IsEmpty(s string) bool

func IsNonEmpty

func IsNonEmpty(s string) bool

func Size

func Size(s string) int

func ToBytes

func ToBytes(s string) []byte

func ToRunes

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