strings

package
v0.0.0-...-c1b4e3e Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2025 License: GPL-3.0, LGPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AnyPrefix

func AnyPrefix(text string, prefixes ...string) bool

AnyPrefix tests for any of provided prefixes.

func AnySuffix

func AnySuffix(text string, suffixes ...string) bool

AnySuffix tests for any of provided suffixes.

func CondText

func CondText(cond bool, truetext, falsetext string) string

CondText returns a certain text given a provided condition is true or false. Both the true and false case texts can be provided.

func ContainsAll

func ContainsAll(s, chars string) bool

ContainsAll tests if all chars are present in s (subset).

func FindNonOverlapping

func FindNonOverlapping(text string, substr string) []int

func FindOverlapping

func FindOverlapping(text string, substr string) []int

func IdenticalTo

func IdenticalTo(chars string) func(s string) bool

func NotIdenticalTo

func NotIdenticalTo(chars string) func(s string) bool

func NotSubsetOf

func NotSubsetOf(chars string) func(s string) bool

func NotSupersetOf

func NotSupersetOf(chars string) func(s string) bool

func OrDefault

func OrDefault(text, alt string) string

OrDefault returns the provided text if non-empty, or the alternative otherwise.

func SubsetOf

func SubsetOf(chars string) func(s string) bool

func SupersetOf

func SupersetOf(chars string) func(s string) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

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