From c973d52dbc55b238f1d608636a42ccae100950a1 Mon Sep 17 00:00:00 2001 From: Martin Czygan Date: Tue, 1 Jun 2021 16:39:47 +0200 Subject: matchset: update docs --- skate/matchset.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/skate/matchset.go b/skate/matchset.go index d5f5093..271bad6 100644 --- a/skate/matchset.go +++ b/skate/matchset.go @@ -7,6 +7,11 @@ import ( "sync" ) +// matchSetSep separates the strings we want to lookup. This is a hack to get +// 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). const matchSetSep = "\u001F" // MatchSet allows to match a string against multiple strings at once. Rough -- cgit v1.2.3