2020.2

Table Of Contents
Exceptions
l EOleException Index is lower than 0 or higher than Count-1.
StringSort
StringSort is a convenience class that provides a generic sorting class for ActiveScript-
compatible languages. It is a non-trivial task to sort data in scripting, especially in VBScript
where there is no equivalent for the JScript sort function. It is designed as a list of strings. Each
string in the list is a key based on which the sort is done. Each key can have an optional integer
value that can be used, for example, to retrieve a record in an array.
To create a StringSort object, use CreateObject("MetadataLib.StringSort") or the {A07730B7-
4100-457E-91E2-31BFF24E1EC4} CLSID. Although the object is published by the metadata
library, it is completely independent of the metadata and can be used in any script, including
those run outside of PlanetPress Suite.
Methods
Name Returns Description
"Add(const String Key, Integer Value)" on
the facing page
Integer Adds a new item in the sort list.
Clear() Empties the sort list, removing all
the strings.
"Count()" on the facing page Integer
Returns the number of elements in
the list.
"Delete(Integer Index)" on the facing
page
Removes an item from the sort list.
"Find(const String Key)" on page238 Integer Finds an item in the list and returns
its index.
"Key(Integer Index)" on page238 String Returns the key at the specified
index.
Page 236