Home > Contents > Index >
Template Tag TOC  |   Alpha TOC  |   Tag Family TOC  |   Purpose TOC  |   Annotated TOC  |   Index 

 

SUBSTRING

Constructs a new variable that contains a substring.

Syntax

Parameters

STR (required)
String containing substring.

OUTSTR (required)
Name of variable to contain substring.

INDEX (optional)
Beginning offset in STR. The default for this parameter is 0.

ENDINDEX (optional)
Ending offset in STR. The default for this parameter is the length of STR.

Description

The SUBSTRING tag constructs a new variable containing a substring. For more information about variables, CS Developer's Guide.

errno

The possible values of errno include:

Value
Description
-50
Bad start index.
-51
Bad end index.
-52
Empty output string.

Example

This example places the value "This is a test" in NewString. The value of the variable NewString is test after this tag executes. An error is set if either of the supplied index values is out of range.

See Also

SUBSTITUTE

  Home > Contents > Index >

FatWire XML Tag Reference
Copyright 2005,2006,2007 by FatWire Software
All rights reserved.