#include <pstring.h>
Public Member Functions | |
Construction | |
PSortedStringList (PINDEX count, char const *const *strarr, BOOL caseless=FALSE) | |
PSortedStringList (const PString &str) | |
PSortedStringList (const PStringArray &array) | |
PSortedStringList (const PStringList &list) | |
Overrides from class PObject | |
virtual void | ReadFrom (istream &strm) |
Operations | |
PINDEX | AppendString (const PString &str) |
PINDEX | GetStringsIndex (const PString &str) const |
PINDEX | GetNextStringsIndex (const PString &str) const |
Protected Member Functions | |
PINDEX | InternalStringSelect (const char *str, PINDEX len, Element *thisElement) const |
In addition some addition functions are added that take a const PString# reference instead of a pointer as most standard collection functions do. This is more convenient for when string expressions are used as parameters to function in the collection.
See the PAbstractSortedList# and #PSortedList# classes and #PDECLARE_SORTEDLIST# macro for more information.
|
Create a PStringArray from the array of C strings.
|
|
Create a PSortedStringList of length one from the single string.
|
|
Create a PSortedStringList from the array of strings.
|
|
Create a PSortedStringList from the list of strings.
|
|
Add a string to the list. This will place the string in the correct position in the sorted list.
|
|
Get the index of the next string after specified value. A binary search of tree is performed to find the string greater than or equal to the specified string value.
|
|
Get the index of the string with the specified value. A binary search of tree is performed to find the string value.
|
|
|
|
Input the contents of the object from the stream. This is primarily used by the standard #operator>># function.
The default behaviour reads ' |