Namespace: Consultingwerk.Util
Class 
ListHelper Copy to Clipboard
Parent classes:
Inherits: Progress.Lang.Object

File:ListHelper
Purpose:Provides support for Character delimited lists
Syntax:Static methods only, Protected constructor to disallow
instance creation
Author(s):Mike Fechner / Consultingwerk Ltd.
Created:Sun Jan 10 21:19:01 CET 2010



Top Method Summary
Options Name Purpose
+ CHARACTER AddEntry (character, character) Adds an entry to the list (at the end)
+ CHARACTER AddEntry (character, character, character) Adds an entry to the list (at the end)
+ LONGCHAR AddEntry (longchar, longchar) Adds an entry to the list (at the end)
+ LONGCHAR AddEntry (longchar, longchar, character) Adds an entry to the list (at the end)
+ CHARACTER AddUniqueEntries (character, character) Adds those entries from the new entries list to the target list that are not yet part of the list
+ CHARACTER AddUniqueEntries (character, character, character) Adds those entries from the new entries list to the target list that are not yet part of the list
+ Consultingwerk.Framework.Collections.CharacterDictionary AlternatingListToDictionary (character, character, character) Converts a list of Name Value Pairs into a Character Dictionary for easier processing
+ Consultingwerk.Framework.Collections.CharacterDictionary AlternatingListToDictionary (longchar, character, character) Converts a list of Name Value Pairs into a Character Dictionary for easier processing
+ LOGICAL CanDo (character, character) Checks a string against a list of one or more string matching patterns
+ Consultingwerk.Framework.Collections.CharacterDictionary DelimitedListToDictionary (character, character) Converts a list that contains alternating pairs of names and values in the form: key1,value1,key2,value2,key3,value3
+ CHARACTER EnsureUniqueEntries (character) Ensures that a delimited list has only unique entries
+ CHARACTER EnsureUniqueEntries (character, character) Ensures that a delimited list has only unique entries
+ LOGICAL EntryIsInList (character, character) Returns if a String is contained in a comma delimited list
+ LOGICAL EntryIsInList (character, character, character) Returns if a String is contained in a delimited list
+ CHARACTER EntryWhenAvailable (integer, character) Returns the nth entry of the list, when that entry is availale
+ CHARACTER EntryWhenAvailable (integer, character, character) Returns the nth entry of the list, when that entry is availale
+ CHARACTER EntryWhenAvailable (integer, character, character, character) Returns the nth entry of the list, when that entry is availale
+ CHARACTER ExpandListEntries (character, character) Expands a List pattern
+ CHARACTER ExpandListEntries (character, character, character) Expands a List pattern
+ CHARACTER FirstEntry (character) Returns the first entry of a comma delimited list
+ CHARACTER FirstEntry (character, character) Returns the first list entry
+ CHARACTER InsertEntry (character, integer, character) Inserts an Entry (or a list of Entries) into a List at position
+ CHARACTER InsertEntry (character, integer, character, character) Inserts an Entry (or a list of Entries) into a List at position
+ LONGCHAR InsertEntry (longchar, integer, character) Inserts an Entry (or a list of Entries) into a List at position
+ LONGCHAR InsertEntry (longchar, integer, character, character) Inserts an Entry (or a list of Entries) into a List at position
+ LONGCHAR InsertEntry (longchar, integer, longchar, character) Inserts an Entry (or a list of Entries) into a List at position
+ CHARACTER LastEntry (character) Returns the last entry of a comma delimited list
+ CHARACTER LastEntry (character, character) Returns the last list entry
+ CHARACTER ListEntriesNotContainedInList (character, character) Returns a List of those Entries from the total list that are NOT contained in the matching list
+ CHARACTER ListEntriesNotContainedInList (character, character, character) Returns a List of those Entries from the total list that are NOT contained in the matching list
+ CHARACTER ListFromQueryField (handle, character) Returns a delimited list with the values of one field from all records matched by the query. When a buffer handle is provided, a dynamic query is created
+ CHARACTER ListFromQueryField (handle, character, character) Returns a delimited list with the values of one field from all records matched by the query. When a buffer handle is provided, a dynamic query is created
+ CHARACTER ListStartingEntry (character, integer) Returns a list with all entries of the source list starting from the piStart Entry
+ CHARACTER ListStartingEntry (character, integer, character) Returns a list with all entries of the source list starting from the piStart Entry
+ LONGCHAR ListStartingEntry (longchar, integer) Returns a list with all entries of the source list starting from the piStart Entry
+ LONGCHAR ListStartingEntry (longchar, integer, character) Returns a list with all entries of the source list starting from the piStart Entry
+ CHARACTER ListToEntry (character, integer) Returns a list with all entries of the source list up to the piTo Entry
+ CHARACTER ListToEntry (character, integer, character) Returns a list with all entries of the source list up to the piTo Entry
+ LONGCHAR ListToEntry (longchar, integer) Returns a list with all entries of the source list up to the piTo Entry
+ LONGCHAR ListToEntry (longchar, integer, character) Returns a list with all entries of the source list up to the piTo Entry
+ INTEGER LongestEntry (character) Returns the LENGTH of the longest list entry
+ INTEGER LongestEntry (character, character) Returns the LENGTH of the longest list entry
+ CHARACTER MatchingEntries (character, character) Returns a list of all entries of the first list that are also in the second list
+ CHARACTER MatchingEntries (character, character, character) Returns a list of all entries of the first list that are also in the second list
+ CHARACTER MergeLists (character, character) Merges two lists, effectively adding those entries of the second list to the first list that are not yet contained
+ CHARACTER MergeLists (character, character, character) Merges two lists, effectively adding those entries of the second list to the first list that are not yet contained
+ CHARACTER Remove (character, character) Removes all occurences of the entry from the List
+ CHARACTER Remove (character, character, character) Removes all occurences of the entry from the List
+ CHARACTER RemoveEmptyEntries (character) Removes emptry entries from the list
+ CHARACTER RemoveEmptyEntries (character, character) Removes emptry entries from the list
+ CHARACTER RemoveEntry (character, integer) Removes an Entry from the List
+ CHARACTER RemoveEntry (character, integer, character) Removes an Entry from the List
+ LONGCHAR RemoveEntry (longchar, integer) Removes an Entry from the List
+ LONGCHAR RemoveEntry (longchar, integer, character) Removes an Entry from the List
+ CHARACTER SortList (character) Returns the delimited list sorted
+ CHARACTER SortList (character, character) Returns the delimited list sorted
+ LONGCHAR SortList (longchar) Returns the delimited list sorted
+ LONGCHAR SortList (longchar, character) Returns the delimited list sorted
+ CHARACTER SubstitutePattern (integer, character) Returns a SUBSTITUTE () Pattern for a delimited list
+ CHARACTER TrimEntries (character) TRIM's every individual entry from a delimited list
+ CHARACTER TrimEntries (character, character) TRIM's every individual entry from a delimited list
+ LONGCHAR TrimEntries (longchar) TRIM's every individual entry from a delimited list
+ LONGCHAR TrimEntries (longchar, character) TRIM's every individual entry from a delimited list
+ LOGICAL VerifyUniqueEntries (character) Verifies if a delimited list has only unique entries
+ LOGICAL VerifyUniqueEntries (character, character) Verifies if a delimited list has only unique entries

Top Constructor Summary
Options Name Purpose
# ListHelper () Protected default constructor.


Method Detail
Top

PUBLIC CHARACTER AddEntry (character, character)

Purpose: Adds an entry to the list (at the end)
Notes:

Parameters:
pcList CHARACTER
The list to add the entry to
pcEntry CHARACTER
The entry to add to the list
Returns CHARACTER
The new list
Top

PUBLIC CHARACTER AddEntry (character, character, character)

Purpose: Adds an entry to the list (at the end)
Notes:

Parameters:
pcList CHARACTER
The list to add the entry to
pcEntry CHARACTER
The entry to add to the list
pcDelimiter CHARACTER
The list delimiter
Returns CHARACTER
The new list
Top

PUBLIC LONGCHAR AddEntry (longchar, longchar)

Purpose: Adds an entry to the list (at the end)
Notes:

Parameters:
pcList LONGCHAR
The list to add the entry to
pcEntry LONGCHAR
The entry to add to the list
Returns LONGCHAR
The new list
Top

PUBLIC LONGCHAR AddEntry (longchar, longchar, character)

Purpose: Adds an entry to the list (at the end)
Notes:

Parameters:
pcList LONGCHAR
The list to add the entry to
pcEntry LONGCHAR
The entry to add to the list
pcDelimiter CHARACTER
The list delimiter
Returns LONGCHAR
The new list
Top

PUBLIC CHARACTER AddUniqueEntries (character, character)

Purpose: Adds those entries from the new entries list to the target list that
are not yet part of the list
Notes: Defaults to , as the list delimiter

Parameters:
pcTargetList CHARACTER
The target list to add entries to
pcNewEntries CHARACTER
The list with the entries to add to the target list
Returns CHARACTER
The list of resulting items
Top

PUBLIC CHARACTER AddUniqueEntries (character, character, character)

Purpose: Adds those entries from the new entries list to the target list that
are not yet part of the list
Notes:

Parameters:
pcTargetList CHARACTER
The target list to add entries to
pcNewEntries CHARACTER
The list with the entries to add to the target list
pcDelimiter CHARACTER
The list delimiter (for both lists)
Returns CHARACTER
The list of resulting items
Top

PUBLIC Consultingwerk.Framework.Collections.CharacterDictionary AlternatingListToDictionary (character, character, character)

Purpose: Converts a list of Name Value Pairs into a Character Dictionary for
easier processing
Notes: Sample: Key1=Value1|Key2=Value2|Key3=Value3

Parameters:
pcList CHARACTER
The charcater list to convert
pcPairDelimiter CHARACTER
The delimiter between the Name Value Pairs (| in the above sample)
pcItemDelimiter CHARACTER
The delimiter between a Name and a Value (= in the above sample)
Returns Consultingwerk.Framework.Collections.CharacterDictionary
The CharacterDictionary containing the Name and Value pairs
Top

PUBLIC Consultingwerk.Framework.Collections.CharacterDictionary AlternatingListToDictionary (longchar, character, character)

Purpose: Converts a list of Name Value Pairs into a Character Dictionary for
easier processing
Notes: Sample: Key1=Value1|Key2=Value2|Key3=Value3

Parameters:
pcList LONGCHAR
The charcater list to convert
pcPairDelimiter CHARACTER
The delimiter between the Name Value Pairs (| in the above sample)
pcItemDelimiter CHARACTER
The delimiter between a Name and a Value (= in the above sample)
Returns Consultingwerk.Framework.Collections.CharacterDictionary
The CharacterDictionary containing the Name and Value pairs
Top

PUBLIC LOGICAL CanDo (character, character)

Purpose: Checks a string against a list of one or more string matching patterns
Notes: ABL CAN-DO like function, restoring the pre OE11.0 behaviour. In OE11.0
CAN-DO has changed it's behaviour due to the support for multi-tenancy
Currently the support for negative matches (! character) is not implemented

Parameters:
pcMatchesList CHARACTER
The list of matching patterns
pcString CHARACTER
The string to verify
Returns LOGICAL
The function returns TRUE if the specified string matches an entry from the list
Top

PUBLIC Consultingwerk.Framework.Collections.CharacterDictionary DelimitedListToDictionary (character, character)

Purpose: Converts a list that contains alternating pairs of names and
values in the form: key1,value1,key2,value2,key3,value3
Notes:

Parameters:
pcList CHARACTER
The charcater list to convert
pcDelimiter CHARACTER
The delimiter between the Names and the Values
Returns Consultingwerk.Framework.Collections.CharacterDictionary
The CharacterDictionary containing the Name and Value pairs
Top

PUBLIC CHARACTER EnsureUniqueEntries (character)

Purpose: Ensures that a delimited list has only unique entries
Notes:

Parameters:
pcList CHARACTER
The initial delimited list
Returns CHARACTER
The delimited list with only unique entries
Top

PUBLIC CHARACTER EnsureUniqueEntries (character, character)

Purpose: Ensures that a delimited list has only unique entries
Notes:

Parameters:
pcList CHARACTER
The initial delimited list
pcDelimiter CHARACTER
The list delimited
Returns CHARACTER
The delimited list with only unique entries
Top

PUBLIC LOGICAL EntryIsInList (character, character)

Purpose: Returns if a String is contained in a comma delimited list
Notes: As the ABL CAN-DO function is reserved for checking an ID against a
list of ID patterns and was never intended for string/list matching
this method shoudl be used in many functiony, where the CAN-DO function
was falsely used. In OE11.0 the CAN-DO function has changed it's behaviour
when using the @ character in one of the arguments
See: http://communities.progress.com/pcom/message/173455

Parameters:
pcString CHARACTER
The String to locate in the list
pcList CHARACTER
The comma delimited list
Returns LOGICAL
Logical value indicating if the String is contained in the comma delimited list
Top

PUBLIC LOGICAL EntryIsInList (character, character, character)

Purpose: Returns if a String is contained in a delimited list
Notes: As the ABL CAN-DO function is reserved for checking an ID against a
list of ID patterns and was never intended for string/list matching
this method shoudl be used in many functiony, where the CAN-DO function
was falsely used. In OE11.0 the CAN-DO function has changed it's behaviour
when using the @ character in one of the arguments
See: http://communities.progress.com/pcom/message/173455

Parameters:
pcString CHARACTER
The String to locate in the list
pcList CHARACTER
The comma delimited list
pcDelimiter CHARACTER
The list delimited
Returns LOGICAL
Logical value indicating if the String is contained in the delimited list
Top

PUBLIC CHARACTER EntryWhenAvailable (integer, character)

Purpose: Returns the nth entry of the list, when that entry is availale
Notes: Returns ? when it's not a valid list index

Parameters:
piEntry INTEGER
The entries index
pcList CHARACTER
The delimited list
Returns CHARACTER
The entry or ? when the index is not member of the list
Top

PUBLIC CHARACTER EntryWhenAvailable (integer, character, character)

Purpose: Returns the nth entry of the list, when that entry is availale
Notes: Returns ? when it's not a valid list index

Parameters:
piEntry INTEGER
The entries index
pcList CHARACTER
The delimited list
pcDelimiter CHARACTER
The list delimiter
Returns CHARACTER
The entry or ? when the index is not member of the list
Top

PUBLIC CHARACTER EntryWhenAvailable (integer, character, character, character)

Purpose: Returns the nth entry of the list, when that entry is availale
Notes: Returns ? when it's not a valid list index

Parameters:
piEntry INTEGER
The entries index
pcList CHARACTER
The delimited list
pcDelimiter CHARACTER
The list delimiter
pcAlternativeValue CHARACTER
The alternative value to return when the entry is not available
Returns CHARACTER
The entry or ? when the index is not member of the list
Top

PUBLIC CHARACTER ExpandListEntries (character, character)

Purpose: Expands a List pattern
Notes: Every entry in the pattern list that contains a "*" wild-card character
will be expanded with all matching entries from the source list

Parameters:
pcPatternList CHARACTER
The list with the pattern
pcSourceList CHARACTER
The list with all possible entries
Returns CHARACTER
The expanded pattern list
Top

PUBLIC CHARACTER ExpandListEntries (character, character, character)

Purpose: Expands a List pattern
Notes: Every entry in the pattern list that contains a "*" wild-card character
will be expanded with all matching entries from the source list

Parameters:
pcPatternList CHARACTER
The list with the pattern
pcSourceList CHARACTER
The list with all possible entries
pcDelimiter CHARACTER
The delimiter for both lists
Returns CHARACTER
The expanded pattern list
Top

PUBLIC CHARACTER FirstEntry (character)

Purpose: Returns the first entry of a comma delimited list
Notes:

Parameters:
pcList CHARACTER
The list to return the first entry of
Returns CHARACTER
The first entry
Top

PUBLIC CHARACTER FirstEntry (character, character)

Purpose: Returns the first list entry
Notes:

Parameters:
pcList CHARACTER
The list to return the first entry of
pcDelimiter CHARACTER
The list delimiter
Returns CHARACTER
The first entry
Top

PUBLIC CHARACTER InsertEntry (character, integer, character)

Purpose: Inserts an Entry (or a list of Entries) into a List at position
Notes: Defaults to "," as the list delimiter

Parameters:
pcSourceList CHARACTER
The source list
piPosition INTEGER
The position the pcNewEntry should be inserted at
pcNewEntry CHARACTER
The entry to insert at piPositon
Returns CHARACTER
The new CHARACTER list
Top

PUBLIC CHARACTER InsertEntry (character, integer, character, character)

Purpose: Inserts an Entry (or a list of Entries) into a List at position
Notes:

Parameters:
pcSourceList CHARACTER
The source list
piPosition INTEGER
The position the pcNewEntry should be inserted at
pcNewEntry CHARACTER
The entry to insert at piPositon
pcSeparator CHARACTER
The list-separator to for other lists
Returns CHARACTER
The new CHARACTER List
Top

PUBLIC LONGCHAR InsertEntry (longchar, integer, character)

Purpose: Inserts an Entry (or a list of Entries) into a List at position
Notes: Defaults to "," as the list delimiter

Parameters:
pcSourceList LONGCHAR
The source list
piPosition INTEGER
The position the pcNewEntry should be inserted at
pcNewEntry CHARACTER
The entry to insert at piPositon
Returns LONGCHAR
The new LONGCHAR List
Top

PUBLIC LONGCHAR InsertEntry (longchar, integer, character, character)

Purpose: Inserts an Entry (or a list of Entries) into a List at position
Notes:

Parameters:
pcSourceList LONGCHAR
The source list
piPosition INTEGER
The position the pcNewEntry should be inserted at
pcNewEntry CHARACTER
The entry to insert at piPositon
pcSeparator CHARACTER
The list-separator to for other lists
Returns LONGCHAR
The new LONGCHAR List
Top

PUBLIC LONGCHAR InsertEntry (longchar, integer, longchar, character)

Purpose: Inserts an Entry (or a list of Entries) into a List at position
Notes:

Parameters:
pcSourceList LONGCHAR
The source list
piPosition INTEGER
The position the pcNewEntry should be inserted at
pcNewEntry LONGCHAR
The entry to insert at piPositon
pcSeparator CHARACTER
The list-separator to for other lists
Returns LONGCHAR
The new LONGCHAR List
Top

PUBLIC CHARACTER LastEntry (character)

Purpose: Returns the last entry of a comma delimited list
Notes:

Parameters:
pcList CHARACTER
The list to return the last entry of
Returns CHARACTER
The last entry
Top

PUBLIC CHARACTER LastEntry (character, character)

Purpose: Returns the last list entry
Notes:

Parameters:
pcList CHARACTER
The list to return the last entry of
pcDelimiter CHARACTER
The list delimiter
Returns CHARACTER
The last entry
Top

PUBLIC CHARACTER ListEntriesNotContainedInList (character, character)

Purpose: Returns a List of those Entries from the total list that are NOT
contained in the matching list
Notes:

Parameters:
pcTotalList CHARACTER
The total list of entries
pcMatchingList CHARACTER
The list of match with the total list
Returns CHARACTER
The list of entries of the total list that are not contained in the matching list
Top

PUBLIC CHARACTER ListEntriesNotContainedInList (character, character, character)

Purpose: Returns a List of those Entries from the total list that are NOT
contained in the matching list
Notes:

Parameters:
pcTotalList CHARACTER
The total list of entries
pcMatchingList CHARACTER
The list of match with the total list
pcDelimiter CHARACTER
The delimiters used in both lists
Returns CHARACTER
The list of entries of the total list that are not contained in the matching list
Top

PUBLIC CHARACTER ListFromQueryField (handle, character)

Purpose: Returns a delimited list with the values of one field
from all records matched by the query. When a buffer handle is
provided, a dynamic query is created
Notes: Does reposition the buffer - so developers cannot rely on
the buffer contents after calling this method

Parameters:
phQuery HANDLE
The handle of the query or buffer
pcFieldName CHARACTER
The name of the field
Returns CHARACTER
The delimited list of field values
Top

PUBLIC CHARACTER ListFromQueryField (handle, character, character)

Purpose: Returns a delimited list with the values of one field
from all records matched by the query. When a buffer handle is
provided, a dynamic query is created
Notes: Does reposition the buffer - so developers cannot rely on
the buffer contents after calling this method
When a buffer handle is passed in, instead of a query handle,
an additional buffer is created for navigating the query

Parameters:
phQuery HANDLE
The handle of the query or buffer
pcFieldName CHARACTER
The name of the field
pcDelimiter CHARACTER
The list delimiter
Returns CHARACTER
The delimited list of field values
Top

PUBLIC CHARACTER ListStartingEntry (character, integer)

Purpose: Returns a list with all entries of the source list starting from the
piStart Entry
Notes: Defaults to comma as the list delimiter

Parameters:
pcList CHARACTER
The source list
piStart INTEGER
The starting index form the source list for entries getting into the target list
Returns CHARACTER
The target list
Top

PUBLIC CHARACTER ListStartingEntry (character, integer, character)

Purpose: Returns a list with all entries of the source list starting from the
piStart Entry
Notes:

Parameters:
pcList CHARACTER
The source list
piStart INTEGER
The starting index form the source list for entries getting into the target list
pcSeparator CHARACTER
The list-separator to for other lists
Returns CHARACTER
The target list
Top

PUBLIC LONGCHAR ListStartingEntry (longchar, integer)

Purpose: Returns a list with all entries of the source list starting from the
piStart Entry
Notes: Defaults to comma as the list delimiter

Parameters:
pcList LONGCHAR
The source list
piStart INTEGER
The starting index form the source list for entries getting into the target list
Returns LONGCHAR
The target list
Top

PUBLIC LONGCHAR ListStartingEntry (longchar, integer, character)

Purpose: Returns a list with all entries of the source list starting from the
piStart Entry
Notes:

Parameters:
pcList LONGCHAR
The source list
piStart INTEGER
The starting index form the source list for entries getting into the target list
pcSeparator CHARACTER
The list-separator to for other lists
Returns LONGCHAR
The target list
Top

PUBLIC CHARACTER ListToEntry (character, integer)

Purpose: Returns a list with all entries of the source list up to the
piTo Entry
Notes: Defaults to "," as the list delimiter

Parameters:
pcList CHARACTER
The source list
piTo INTEGER
The last index form the source list for entries getting into the target list
Returns CHARACTER
The target list
Top

PUBLIC CHARACTER ListToEntry (character, integer, character)

Purpose: Returns a list with all entries of the source list up to the
piTo Entry
Notes:

Parameters:
pcList CHARACTER
The source list
piTo INTEGER
The last index form the source list for entries getting into the target list
pcSeparator CHARACTER
The list-separator to for other lists
Returns CHARACTER
The target list
Top

PUBLIC LONGCHAR ListToEntry (longchar, integer)

Purpose: Returns a list with all entries of the source list up to the
piTo Entry
Notes: Defaults to "," as the list delimiter

Parameters:
pcList LONGCHAR
The source list
piTo INTEGER
The last index form the source list for entries getting into the target list
Returns LONGCHAR
The target list
Top

PUBLIC LONGCHAR ListToEntry (longchar, integer, character)

Purpose: Returns a list with all entries of the source list up to the
piTo Entry
Notes:

Parameters:
pcList LONGCHAR
The source list
piTo INTEGER
The last index form the source list for entries getting into the target list
pcSeparator CHARACTER
The list-separator to for other lists
Returns LONGCHAR
The target list
Top

PUBLIC INTEGER LongestEntry (character)

Purpose: Returns the LENGTH of the longest list entry
Notes:

Parameters:
pcList CHARACTER
The list to return the longest entry of
Returns INTEGER
The length of the longest list entry
Top

PUBLIC INTEGER LongestEntry (character, character)

Purpose: Returns the LENGTH of the longest list entry
Notes:

Parameters:
pcList CHARACTER
The list to return the longest entry of
pcDelimiter CHARACTER
The list delimiter
Returns INTEGER
The length of the longest list entry
Top

PUBLIC CHARACTER MatchingEntries (character, character)

Purpose: Returns a list of all entries of the first list that are
also in the second list
Notes:

Parameters:
pcList1 CHARACTER
The first list
pcList2 CHARACTER
The second list
Returns CHARACTER
The list of the entries in both lists
Top

PUBLIC CHARACTER MatchingEntries (character, character, character)

Purpose: Returns a list of all entries of the first list that are
also in the second list
Notes:

Parameters:
pcList1 CHARACTER
The first list
pcList2 CHARACTER
The second list
pcDelimiter CHARACTER
The list delimiter
Returns CHARACTER
The list of the entries in both lists
Top

PUBLIC CHARACTER MergeLists (character, character)

Purpose: Merges two lists, effectively adding those entries of the second list
to the first list that are not yet contained
Notes: Both lists are expected to use the comma as the seperator

Parameters:
pcFirstList CHARACTER
The first list
pcSecondList CHARACTER
The second list
Returns CHARACTER
The list that contains the unique entries from both lists
Top

PUBLIC CHARACTER MergeLists (character, character, character)

Purpose: Merges two lists, effectively adding those entries of the second list
to the first list that are not yet contained
Notes: Both lists are expected to use the same separator

Parameters:
pcFirstList CHARACTER
The first list
pcSecondList CHARACTER
The second list
pcSeparator CHARACTER
The optional separator for the list
Returns CHARACTER
The list that contains the unique entries from both lists
Top

PUBLIC CHARACTER Remove (character, character)

Purpose: Removes all occurences of the entry from the List
Notes:

Parameters:
pcList CHARACTER
The list to remove entries from
pcEntry CHARACTER
The entry to remove
Returns CHARACTER
The list without the entry
Top

PUBLIC CHARACTER Remove (character, character, character)

Purpose: Removes all occurences of the entry from the List
Notes:

Parameters:
pcList CHARACTER
The list to remove entries from
pcEntry CHARACTER
The entry to remove
pcDelimiter CHARACTER
The list delimiter
Returns CHARACTER
The list without the entry
Top

PUBLIC CHARACTER RemoveEmptyEntries (character)

Purpose: Removes emptry entries from the list
Notes:

Parameters:
pcList CHARACTER
The list to remove entries from
Returns CHARACTER
The list without empty entries
Top

PUBLIC CHARACTER RemoveEmptyEntries (character, character)

Purpose: Removes emptry entries from the list
Notes:

Parameters:
pcList CHARACTER
The list to remove entries from
pcListDelimiter CHARACTER
The list delimiter
Returns CHARACTER
The list without empty entries
Top

PUBLIC CHARACTER RemoveEntry (character, integer)

Purpose: Removes an Entry from the List
Notes: Defaults to "," as the list delimiter

Parameters:
pcList CHARACTER
The source list
piEntry INTEGER
the list index to be removed
Returns CHARACTER
The list without the given entry
Top

PUBLIC CHARACTER RemoveEntry (character, integer, character)

Purpose: Removes an Entry from the List
Notes:

Parameters:
pcList CHARACTER
The source list
piEntry INTEGER
the list index to be removed
pcSeparator CHARACTER
The optional separator for the list
Returns CHARACTER
The list without the given entry
Top

PUBLIC LONGCHAR RemoveEntry (longchar, integer)

Purpose: Removes an Entry from the List
Notes: Defaults to "," as the list delimiter

Parameters:
pcList LONGCHAR
The source list
piEntry INTEGER
the list index to be removed
Returns LONGCHAR
The list without the given entry
Top

PUBLIC LONGCHAR RemoveEntry (longchar, integer, character)

Purpose: Removes an Entry from the List
Notes:

Parameters:
pcList LONGCHAR
The source list
piEntry INTEGER
the list index to be removed
pcSeparator CHARACTER
The optional separator for the list
Returns LONGCHAR
The list without the given entry
Top

PUBLIC CHARACTER SortList (character)

Purpose: Returns the delimited list sorted
Notes:

Parameters:
pcList CHARACTER
The list to sort
Returns CHARACTER
The sorted list
Top

PUBLIC CHARACTER SortList (character, character)

Purpose: Returns the delimited list sorted
Notes:

Parameters:
pcList CHARACTER
The list to sort
pcDelimiter CHARACTER
The list delimiter
Returns CHARACTER
The sorted list
Top

PUBLIC LONGCHAR SortList (longchar)

Purpose: Returns the delimited list sorted
Notes:

Parameters:
pcList LONGCHAR
The list to sort
Returns LONGCHAR
The sorted list
Top

PUBLIC LONGCHAR SortList (longchar, character)

Purpose: Returns the delimited list sorted
Notes:

Parameters:
pcList LONGCHAR
The list to sort
pcDelimiter CHARACTER
The list delimiter
Returns LONGCHAR
The sorted list
Top

PUBLIC CHARACTER SubstitutePattern (integer, character)

Purpose: Returns a SUBSTITUTE () Pattern for a delimited list
Notes: e.g. &1,&2,&3,&4

Parameters:
piEntries INTEGER
The number of entries in the list (max 9)
pcDelimiter CHARACTER
The list delimiter
Returns CHARACTER
The SUBSTITUTE () Patetrn for a delimited list
Top

PUBLIC CHARACTER TrimEntries (character)

Purpose: TRIM's every individual entry from a delimited list
Notes: Uses the default delimiter of ,

Parameters:
pcList CHARACTER
The List to TRIM all entries in
Returns CHARACTER
The list which all entries TRIM'ed
Top

PUBLIC CHARACTER TrimEntries (character, character)

Purpose: TRIM's every individual entry from a delimited list
Notes:

Parameters:
pcList CHARACTER
The List to TRIM all entries in
pcDelimiter CHARACTER
The List delimiter
Returns CHARACTER
The list which all entries TRIM'ed
Top

PUBLIC LONGCHAR TrimEntries (longchar)

Purpose: TRIM's every individual entry from a delimited list
Notes: Uses the default delimiter of ,

Parameters:
pcList LONGCHAR
The List to TRIM all entries in
Returns LONGCHAR
The list which all entries TRIM'ed
Top

PUBLIC LONGCHAR TrimEntries (longchar, character)

Purpose: TRIM's every individual entry from a delimited list
Notes:

Parameters:
pcList LONGCHAR
The List to TRIM all entries in
pcDelimiter CHARACTER
The List delimiter
Returns LONGCHAR
The list which all entries TRIM'ed
Top

PUBLIC LOGICAL VerifyUniqueEntries (character)

Purpose: Verifies if a delimited list has only unique entries
Notes: Defaults to the comma as the list delimiter

Parameters:
pcList CHARACTER
The delimited list
Returns LOGICAL
Logical value indicating if the list has only unique entries
Top

PUBLIC LOGICAL VerifyUniqueEntries (character, character)

Purpose: Verifies if a delimited list has only unique entries
Notes: The empty list is considered to only has unique entries

Parameters:
pcList CHARACTER
The delimited list
pcDelimiter CHARACTER
The list delimiter
Returns LOGICAL
Logical value indicating if the list has only unique entries


Constructor Detail
Top

PROTECTED ListHelper ()

Purpose: Protected default constructor.
Notes: There's no need to create instances of the helper classes



©2006-2020 Consultingwerk Ltd.         info@consultingwerk.de         http://www.consultingwerk.de       04.02.2020 23:33:23