Skip to content

Modern Map Contains

Paul Squires edited this page Oct 19, 2026 · 5 revisions

Home › Map › Map › Contains

Contains

Returns true if the key is present, without adding it.

Syntax

Contains( k ) as boolean

Examples

#import "std/containers"
using containers

dim ages as Map( of ustring, integer )
ages.Put( "ada", 36 )

print ages.Contains( "ada" )     '' true
print ages.Contains( "alan" )    '' false

'' Contains does not insert. Reading through m[ "alan" ] would have.
print ages.Count                 '' 1

Library: Map
Category: Map
Documented under: Members

Clone this wiki locally