Difference between revisions of "LazUtils"

From Free Pascal wiki
Jump to navigationJump to search
(→‎Overview: LazUtils is NOT part of LCL but a seperate components collection that has no dependency on the LCL)
(Bart does this claify things? Thanks.)
Line 1: Line 1:
 
== Overview ==
 
== Overview ==
LazUtils is collection of units that provides non-visual utility functions/classes. In other words, they are also suitable for use in command-line, non-GUI applications.
+
LazUtils is collection of units that provides non-visual utility functions/classes; it is part of the units supplied by Lazarus but not the LCL (Lazarus Component Library). In other words, they are also suitable for use in command-line, non-GUI applications.
  
 
__TOC__
 
__TOC__
Line 13: Line 13:
  
 
[[Category: Lazarus]]
 
[[Category: Lazarus]]
[[Category: LCL]]
 

Revision as of 14:25, 1 May 2014

Overview

LazUtils is collection of units that provides non-visual utility functions/classes; it is part of the units supplied by Lazarus but not the LCL (Lazarus Component Library). In other words, they are also suitable for use in command-line, non-GUI applications.

TDictionaryStringList

This is an unsorted TStringList with a fast lookup feature. Internally it uses a string map container to store the string again. It is then used for InsertItem, Contains, IndexOf and Find methods. The extra container does not reserve excessive memory because the strings are reference-counted and not actually copied.

TDictionaryStringList fully supports all Duplicates property values including dupIgnore and dupError. A normal unsorted TStringList lacks this support for some values of Duplicates.

This class is particularly useful when you need to preserve the order in which strings have been inserted into an unsorted list at the same time as needing the ability to do fast lookups (to check if a string is already listed), when you need to prevent addition of duplicate strings.