"contains"(mapping::contains)
Returns true if the key is already in the mapping.
Synopsis
bool mapping.contains(T key);
Parameters
| Parameter | Description |
|---|---|
| key | Mapping key |
Description
Checks whether the mapping contains the given key. Returns TRUE if the key exists, FALSE otherwise.
Example
main()
{
mapping m = makeMapping("city", "Vienna", "country", "Austria");
DebugN(m.contains("city")); // TRUE
DebugN(m.contains("name")); // FALSE
}
Assignment
Mapping
