[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
EXPAND()
Expands a string by inserting characters
------------------------------------------------------------------------------
Syntax
EXPAND(<cString>,[<nNumber>],[<cCharacter| nCharacter>])
--> cString
Arguments
<cString> Designates the string that is processed.
<nNumber> Designates the number of the <cCharacter|nCharacter>
characters that are inserted between each character in the <cString>.
The default value is one character.
<cCharacter|nCharacter> Designates the character that is inserted
between each character in <cString>. The default value is a space,
CHR(32).
Returns
The processed <cString> is returned.
Description
EXPAND() can be used to justify text output, although the text is stored
normally. This saves memory capacity with text constants or in
databases.
Notes
. Expansion only takes place when the <cString> contains at
least two characters.
. To fill out a character string at the ends, use the PADLEFT()
and PADRIGHT() functions.
Examples
. Use the default value and expand with one space:
? EXPAND("123456") // "1 2 3 4 5 6"
. Expand with two spaces:
? EXPAND("123456", 2) // "1 2 3 4 5 6"
. Expand with a ".":
? EXPAND("123456", ".") // "1.2.3.4.5.6"
. Expand with two "."s:
? EXPAND("123456", 2, ".") // "1..2..3..4..5..6"
See Also:
CHARSPREAD()
PADLEFT()
PADRIGHT()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson