patterns

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2026 License: Apache-2.0 Imports: 2 Imported by: 0 modules, 0 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

This section is empty.

Functions

func Contains

func Contains(text, pattern string) bool

Contains checks if text contains pattern with case sensitivity from global flag

func Equals

func Equals(text, pattern string) bool

Equals checks if text equals pattern with case sensitivity from global flag

Types

type PatternMatcher

type PatternMatcher struct {
	// contains filtered or unexported fields
}

PatternMatcher provides utilities for pattern matching with case sensitivity control

func NewPatternMatcher

func NewPatternMatcher() *PatternMatcher

NewPatternMatcher creates a new pattern matcher that automatically reads the case-insensitive flag

func (*PatternMatcher) Contains

func (pm *PatternMatcher) Contains(text, pattern string) bool

Contains checks if the text contains the pattern, respecting case sensitivity

func (*PatternMatcher) Equals

func (pm *PatternMatcher) Equals(text, pattern string) bool

Equals checks if the text equals the pattern, respecting case sensitivity

func (*PatternMatcher) HasPrefix

func (pm *PatternMatcher) HasPrefix(text, prefix string) bool

HasPrefix checks if the text has the prefix, respecting case sensitivity

func (*PatternMatcher) HasSuffix

func (pm *PatternMatcher) HasSuffix(text, suffix string) bool

HasSuffix checks if the text has the suffix, respecting case sensitivity

Jump to

Keyboard shortcuts

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