pattern

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2021 License: Apache-2.0 Imports: 1 Imported by: 24

Documentation

Overview

Package pattern provides a basic pattern matching utility. Patterns may contain fixed text, and/or special characters (`*`, `?`). `*` represents 0 or more wildcard characters. `?` represents a single wildcard character.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WildcardMatch

func WildcardMatch(pattern, text string, caseInsensitive bool) bool

WildcardMatch returns true if text matches pattern at the given case-sensitivity; returns false otherwise.

func WildcardMatchCaseInsensitive

func WildcardMatchCaseInsensitive(pattern, text string) bool

WildcardMatchCaseInsensitive returns true if text matches pattern (case-insensitive); returns false otherwise.

Types

This section is empty.

Jump to

Keyboard shortcuts

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