function IndexOfItem(const S: string; const Direction: TDirection): Integer; overload;
IndexOf from either end: FromBeginning the first item equal to S, FromEnd the last; -1 when there is none.
| # | Name | Description |
|---|---|---|
| 1 | S | The text, every text kind. |
| 2 | Direction | FromBeginning: the first equal item; FromEnd: the last. |
Returns: Integer - The item's index, or -1.