Return the substring of text1 which is before the leftmost occurrence of text2 in text1. If text2 does not occur in text1, text1 is returned.
|
||
For the one-argument form, if the current distance units are FINCH, text is the conversion of the decimal inches value number1 into the format ’aa’bb.cc/dd’. Otherwise, text is the STRING conversion of number1.
|
||||||||||||
|
||||||||||||
|
||||||||||||
|
||||||||||||
With two arguments, returns the number1 component of text1 assuming that text1 is split on any whitespace characters. If number1 is negative, counting of components starts from the right.
With three arguments, as above, but use text2 as the separator on which splitting takes place.
|
||
If int2 is given this specifies the number of replacements to make. int1 and/or int2 may be negative to indicate that the direction is backwards.
|
||
If the replacement string text3 is a null string the required number of occurrences of the search string text2 are removed. For example:
|
||
If the input string text1 is a null string or an unset text attribute, the input string text1 is returned unchanged. For example:
If the search string text2 is longer than the input string text1, the input string text1 is returned unchanged. For example:
If no occurrence of the search string text2 is found, the input string text1 is returned unchanged. For example:
|
||
If the number of replacements required int2 is greater than the actual number of occurrence from the specified start occurrence, replacements are made up to the end of the string ( or beginning in backwards mode). For example:
|
With two arguments the data type may be either numeric (scalar) or position or direction. With two arguments, convert a number or position into a text string using the format described by text1, which may take any of the values between ’D0’ and ’D6’ (or ’d0’ and ’d6’), where the number indicates the number of decimal places.
|
||||||||||
With two arguments, return the substring of text1 beginning at the position number1 to the end of text1.
With three arguments, return the substring of text1 beginning at the position number1 and of length number2. If number1 is negative, then counting of characters starts from the RHS of the input string. If number2 is negative, then characters up to and including the start position are returned.
|
||
When only one argument is supplied, TRIM removes all spaces to the left (leading) and right (trailing) of text1 and returns the answer in text.
When two arguments are supplied, text2 specifies where the spaces should be removed from: either ’L’ or ’l’ for left, ’R’ or ’r’ for right, and ’M’ or ’m’ for multiple (where multiple occurrences of blanks are squeezed to a single spaces) or any combination of the three key letters. So the default is ’LR’ when this field is omitted.
When the third argument text3 is also supplied, this should only be a single character which overrides the space character as the character being trimmed.
|
||
Errors Scalar variable may not be indexed (e.g. VTEXT (!var[1]) ).
Array variable must have an index (e.g. VTEXT ( !array ) ).
|