You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

You will note that some Action properties are of type TStrings. TStrings is a standard Delphi type that we have exposed to the scripting engine. It is basically a string collection. Below are the properties of TStrings that you will find useful:

   procedure Clear;

   function Add(const S: string): Integer;

   procedure Delete(Index: Integer);

   procedure Insert(Index: Integer; const S: string);

   function IndexOf(const S: string): Integer;

   property Strings[Index: Integer]: string; //index is zero based

   property Count: Integer;

   property Text: string; //returns the entries in the collection, each entry on a new line

   property Names[Index: Integer]: string;  // used to access the name of a string which is of the format Andlt;nameAndgt;=Andlt;valueAndgt;

   property Values[Index: String]: string;  // used to access the value of a string which is of the format Andlt;nameAndgt;=Andlt;valueAndgt;

   property ValueFromIndex[Index: Integer] : string; // used to access the value of a string which is of the format Andlt;nameAndgt;=Andlt;valueAndgt;

Example:

The following code reduces each item in a List Iterator's list of items down to its leftmost three characters:

  • No labels