[TOC] [Prev] [Next] [Bottom]



<@LEFT>

Syntax

<@LEFT STR=string NUMCHARS=numChars [ENCODING=encoding]>

Description

Returns the first NUMCHARS characters from the string specified in STR and returns the extracted substring.

If the string contains any spaces--except for space embedded within meta tags--the string must be quoted.

Both STR and NUMCHARS attributes are mandatory. If a syntax error is encountered while the expression is parsed--no attributes at all, no string or no number of characters--the tag returns an empty string.

Examples

<@LEFT STR="alpha" NUMCHARS="3">

This example returns "alp", the first three characters of "alpha".

<@LEFT STR="<@INCLUDE FILE='<@APPFILEPATH>BrownFox.txt'>" NUMCHARS="3">

This example returns "The", the first three characters of "The Quick Brown Fox Jumps Over The Lazy Dog" (the contents of the BrownFox.txt file).

See Also

Encoding Attribute
<@REPLACE>
<@RIGHT>
<@SUBSTRING>



[TOC] [Prev] [Next] [Bottom]



docs@pervasive.com

Copyright © 1998, Pervasive Software Inc. All rights reserved.