CoreClasses Xojo Plugin

PrefixDictionary.Lookup Method

Looks up value of a Key and Returns its value Variant or default value if key was not found.

Lookup(
   key as String,
   defaultValue as Variant) as Variant

Parameters

key
The key to lookup.
defaultValue
The default value to use if key was not found.

Returns

Variant
The value of the requested key or defaultValue if the key was not found.

Remarks

The Lookup function is encoding-sensitive and in this version of the prefix dictionary it is case sensitive also.


var d As new EinhugurCollections.PrefixDictionary()
d.Value("Can") = "Can"
d.Value("Canister") = "Canister"
d.Value("Car") = "Car"
d.Value("Cart") = "Cart"

var a As Variant = d.Lookup("Car"), "Some default value")

See Also

PrefixDictionary Class