util

package
v0.0.0-...-86fa648 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HashKey

func HashKey(key string) int

HashKey hash a string to an int value using fnv32 algorithm

func PattenMatch

func PattenMatch(pattern, src string) bool

PattenMatch matches a string with a wildcard pattern. It supports following cases: - h?llo matches hello, hallo and hxllo - h*llo matches hllo and heeeello - h[ae]llo matches hello and hallo, but not hillo - h[^e]llo matches hallo, hbllo, ... but not hello - h[a-b]llo matches hallo and hbllo - Use \ to escape special characters if you want to match them verbatim.

Types

This section is empty.

Jump to

Keyboard shortcuts

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