+-- Tries to match each of the patterns and returns the captures of the first
+-- matching pattern (up to 5 captures are supported). Returns nil when nothing
+-- matches.
+function buffers.visualizers.lam.match_mul(str, patterns)
+ for i, pat in ipairs(patterns) do
+ a, b, c, d, e = utf.match(str, pat)
+ if a then
+ return a, b, c, d, e
+ end
+ end
+ return nil
+end
+