Loading

CONTAINSKEY

maps

The CONTAINSKEY function checks if the key element on top of the stack is a key of the map on second position.

The key is consumed, and a boolean is pushed on the stack.

CONTAINSKEY is available since version 1.0.0.

See also

Signatures

Examples

{ 'foo' 42 'bar' true 'cool' 'always' } 'bar' CONTAINSKEY SWAP 'nok' CONTAINSKEY
{ 'key1' 'foo' 'key2' 'bar' 'key3' 'cool' } 'mymap' STORE <% $mymap 'key2' CONTAINSKEY SWAP DROP %> //keep only boolean result for conditional test <% 'key2 present, value = ' $mymap 'key2' GET + %> IFT //if then