Logo

Programming-Idioms

History of Idiom 51 > diff from v11 to v12

Edit summary for version 12 by :

Version 11

2015-08-24, 00:16:26

Version 12

2015-08-24, 00:16:59

Idiom #51 Check if map contains key

Determine whether map m contains an entry for key k

Idiom #51 Check if map contains key

Determine whether map m contains an entry for key k

Imports
uses fgl, classes;
Imports
uses fgl, classes;
Code
// This works for a number of Pascal containers, including TFPGMap.
mymap.IndexOf('two') >= 0
Code
// This works for a number of Pascal containers, including TFPGMap.
_m.IndexOf(k) >= 0
Doc URL
http://wiki.freepascal.org/Generics#fgl_unit
Doc URL
http://wiki.freepascal.org/Generics#fgl_unit