资 源 简 介
A library that encodes the result of pattern matching by returning the original string and a slice of index pairs that represent the matched substrings. It has methods for filtering, refining and manipulating the results.
Pattern matching locates substrings in its superstring. This library encodes matches in the S struct by keeping the original string (a []byte) and a slice of index pairs (a [][]int, like the result of *regexp.Regexp.FindAllStringIndex) representing the matched substrings. The substrings are always in the order that they appear in the original substring and never overlap. *S both allows for easy creation of the [][]int, via an interface similiar to that of container.Vector, and for quite simple but sophisticated manipulation of the information it encodes.
Storing matches as a pair like this is far more useful than simply returning the substrings or just
文 件 列 表
util_test.go
util.go
replacer_test.go
replacer.go
mutators_test.go
mutators.go
matcher_test.go
matcher.go
finder_test.go
finder.go
duplicators_test.go
duplicators.go
defs_test.go
algorithms_test.go
algorithms.go
Makefile
defs.go
shims
Makefile
bytes.go
bytes_test.go
defs.go
defs_test.go
regexp.go
unicode.go
unicode_test.go
utf8.go
utf8_test.go
combinators
defs.go
Makefile