package string
import "github.com/IBM/fp-go/string"
Index ¶
- Variables
- func Eq(left string, right string) bool
- func Format[T any](format string) func(t T) string
- func IsEmpty(s string) bool
- func IsNonEmpty(s string) bool
- func Semigroup() S.Semigroup[string]
- func Size(s string) int
- func ToBytes(s string) []byte
- func ToRunes(s string) []rune
Variables ¶
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)) )
var Monoid = M.MakeMonoid(concat, "")
Monoid is the monoid implementing string concatenation
Functions ¶
func Eq ¶
func Format ¶
Format applies a format string to an arbitrary value
func IsEmpty ¶
func IsNonEmpty ¶
func Semigroup ¶
func Size ¶
func ToBytes ¶
func ToRunes ¶
Source Files ¶
monoid.go semigroup.go string.go
Directories ¶
Path | Synopsis |
---|---|
string/generic |
- Version
- v1.0.151 (latest)
- Published
- Nov 23, 2024
- Platform
- linux/amd64
- Imports
- 6 packages
- Last checked
- 4 months ago –
Tools for package owners.