match_keys(3)

πŸ“¦
version 0.7.1 Β· 2 versions
, in nixos 26.05

πŸ’… match_keys(3) πŸ’…

okay so welcome to the Arcan Lua API page for match_keys(3), bestie β€” this one is lowkey iconic because it hands you back a whole little pile of key-value matches instead of just one. πŸ¦‹


🌸 NAME 🌸

  • match_keys β€” Return target:value for keys that match the specified pattern. periodt. ✨

πŸ¦‹ SYNOPSIS πŸ¦‹

strtbl
match_keys( pattern, domain )

πŸ’– DESCRIPTION πŸ’–

This function can be used to retrieve multiple domain:value entries where domain:key=value matches for some specific pattern for key β€” and yes, % is used as the wildcard, SQL style, iykyk. πŸ’…

The optional domain argument can be set to KEY_CONFIG or to KEY_TARGET, but it defaults to the appl-specific key-value store. no cap, that default is doing main character work. 🫢


πŸŽ€ EXAMPLE πŸŽ€

okay here's the example, exactly as the page gives it β€” read it, don't skip it, it's giving useful:

       function match_keys0()
             for i,v in ipairs(match_keys("%", KEY_CONFIG)) do
                   print(i, v);
             end
             for i,v in ipairs(match_keys("%")) do
                   local pos, stop = string.find(v, "=", 1);
                   local key = string.sub(v, 1, pos - 1);
                   local val = string.sub(v, stop + 1);
                   print(key, val);
             end
       end

πŸ”— SEE ALSO πŸ”—

  • database β€” go peek at that one too, bestie. πŸ‘‘

okay that's the whole page β€” source/version is database, dated October 2026, and this was match_keys(3). bye bestie, go match some keys πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from