aboutsummaryrefslogtreecommitdiffstats
path: root/skate
diff options
context:
space:
mode:
authorMartin Czygan <martin.czygan@gmail.com>2021-06-01 16:39:47 +0200
committerMartin Czygan <martin.czygan@gmail.com>2021-06-01 16:39:47 +0200
commitc973d52dbc55b238f1d608636a42ccae100950a1 (patch)
treec83aba668897e1b48f8d10db7e9dfbf3af27f615 /skate
parent476f5ff227902200a3e29f5eb3a9c19f69d77c0e (diff)
downloadrefcat-c973d52dbc55b238f1d608636a42ccae100950a1.tar.gz
refcat-c973d52dbc55b238f1d608636a42ccae100950a1.zip
matchset: update docs
Diffstat (limited to 'skate')
-rw-r--r--skate/matchset.go5
1 files changed, 5 insertions, 0 deletions
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 "1F<s>1F<s>..." 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