compare

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2020 License: MIT Imports: 3 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ToLower = strings.ToLower
	ToAscii = unidecode.String
)

Functions

func Compare

func Compare(e1, e2 string, t ...TransformFunc) int

func CompareAscii

func CompareAscii(e1, e2 string) int

func CompareAsciiInsensitive

func CompareAsciiInsensitive(e1, e2 string) int

func CompareInsensitive

func CompareInsensitive(e1, e2 string) int

func Equal

func Equal(cmps ...CompareFunc) func(string, string) bool

func Less

func Less(cmps ...CompareFunc) func(string, string) bool

func Natural

func Natural(e1, e2 string, t ...TransformFunc) int

func NaturalAscii

func NaturalAscii(e1, e2 string) int

func NaturalAsciiInsensitive

func NaturalAsciiInsensitive(e1, e2 string) int

func NaturalInsensitive

func NaturalInsensitive(e1, e2 string) int

Types

type CompareFunc

type CompareFunc func(string, string) int

func BuildCompare

func BuildCompare(cmps ...CompareFunc) CompareFunc

type TransformFunc

type TransformFunc func(string) string

func BuildTransform

func BuildTransform(transforms ...TransformFunc) TransformFunc

Jump to

Keyboard shortcuts

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