From 3ef6b66923aa97c539640085bd88cccac7ede95e Mon Sep 17 00:00:00 2001 From: Martin Czygan Date: Fri, 4 Jun 2021 22:15:35 +0200 Subject: add link to blog on suffix arrays --- skate/matchset.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'skate') diff --git a/skate/matchset.go b/skate/matchset.go index 271bad6..3ad1047 100644 --- a/skate/matchset.go +++ b/skate/matchset.go @@ -11,7 +11,9 @@ import ( // this going: We build a suffix array out of "1F1F..." and prepend "1F" // to the string to lookup to check for a match. This results in a behaviour // similar to strings.HasPrefix. Multiple results must be handled by the user -// (or just work with the cases, where you get exactly one match). +// (or just work with the cases, where you get exactly one match). A related +// blog post on a similar technique: +// https://eli.thegreenplace.net/2016/suffix-arrays-in-the-go-standard-library/. const matchSetSep = "\u001F" // MatchSet allows to match a string against multiple strings at once. Rough -- cgit v1.2.3