XML Script logo
Substring functions
Usage

findstr searches for a substring in a given string, returning 0 (false) if the string doesn't exist, otherwise it returns the index of the first position where the substring is found.

substring retrieves parts of a string, based on a start index (which can be negative to count back from the end of the string) and a number of characters to copy.

findlstr searches for a substring in a given string, returning 0 (false) if the string doesn't exist, otherwise it returns the index of the last position where the substring is found.

rightstr retrieves the rightmost part of a string, based on a start index (which can be negative to count back from the end of the string.

Examples

Finding Substrings

Extracting Substrings

Finding More Substrings

Extracting Rightstrings

Extracting Leftstrings

Version

1.0

Ref

t.47

Date

06 August 1999

XML Script homepage | Documentation home | XML Script docs | Command list | Function list | X-Tract docs

X-Stream, X-Tract and XML Script are trade marks of DecisionSoft Limited
© Copyright 1998-2000 DecisionSoft Limited