Fold Function
Folds strings to create substrings.
Syntax
Fold (string, length)
string is the string to be folded.
length is the length of the substrings in characters.
Remarks
Use the Fold function to divide a string into a number of substrings separated by field marks.
string is separated into substrings of length less than or equal to length. string is separated on blanks, if possible, otherwise it is separated into substrings of the specified length.
If string evaluates to the null value, null is returned. If length is less than 1, an empty string is returned. If length is the null value, Fold fails and the program terminates with a runtime error message.
Example
A=Fold("This is a folded string", 5)
Sets A to:
ThisFis a FfoldeFdFstrinFg
Where F is the field mark.