Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
match_keys(3)			  Arcan Lua API 		   match_keys(3)

NAME
     match_keys - Return target:value for keys that match the specified pattern

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 (where % is used
     as wildcard, SQL  style). The optional domain    argument	can  be  set  to
     KEY_CONFIG   or to KEY_TARGET  but defaults to the appl- specific key-value
     store.

EXAMPLE
     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			   August 2026			   match_keys(3)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=match_keys&sektion=3&manpath=FreeBSD+Ports+15.1.quarterly>

home | help