substring

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2018 License: GPL-3.0 Imports: 2 Imported by: 2

README

substring License GoDoc Pipeline status

Package substring implements case-insensitive substring matching using Rabin-Karp algorithm.

Install

go get -u gitlab.com/opennota/substring

Documentation

Overview

Package substring implements case-insensitive substring matching using Rabin-Karp string searching algorithm.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Contains

func Contains(s, substr string) bool

Contains reports whether substr is within s (ignoring case).

Types

type Matcher

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

Matcher is a case-insensitive substring matcher.

func NewMatcher

func NewMatcher(s string) *Matcher

NewMatcher returns a new substring matcher which case-insensitively matches substring s.

func (*Matcher) Match

func (m *Matcher) Match(s string) bool

Match reports whether s contains the matcher substring (ignoring case).

Jump to

Keyboard shortcuts

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