strmatch

package
v0.0.0-...-9f4f02d Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package strmatch performs string matching.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Matcher

type Matcher func(string) bool

Matcher is a function capable of matching strings.

func All

func All(submatches ...Matcher) Matcher

All returns a matcher that returns true when all submatches are true.

func Any

func Any(submatches ...Matcher) Matcher

Any returns a matcher that returns true when any submatch is true.

func Contains

func Contains(value string) Matcher

Contains returns a matcher for value. The matcher returns true for any string that contains value.

func ContainsInsensitive

func ContainsInsensitive(value string) Matcher

ContainsInsensitive returns a matcher for value. The matcher returns true for anystring that contains value when ignoring case.

func Equal

func Equal(value string) Matcher

Equal returns a matcher that returns true for anything that matches value exactly.

func EqualFold

func EqualFold(value string) Matcher

EqualFold returns a matcher that returns true for anything that case-insenstiviely matches value.

func (Matcher) Match

func (m Matcher) Match(value string) bool

Match returns true if the matcher matches the value.

Jump to

Keyboard shortcuts

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