Show TOC

<<trunc>>Locate this document in the navigation structure

The <<trunc...>> function will truncate the given stringArg to the number of characters of the value given to the required length parameter. By default, the characters are counted from the left most position up to and including the character at the position specified by the length parameter. This includes any white space characters, and also includes the end of line characters of line feed an carriage return, which each count as one.

If the from parameter is given and its value is “left”, the counting begins at the right-most character of the string, truncating the left characters beyond the given length.

If the stringArg is shorter or equal to the length specified, the entire string is returned.

    <<trunc stringArg length=lengthParam [from=left|right]>>
  • stringArg This argument contains the string to be truncated by the function. May be a hard coded value, a data tag, or another function.
  • length This required named parameter specifies the length to which the stringArg value should be truncated.
  • from This optional named parameter specifies the portion of the stringArg value to be truncated. The values are left or right; any other value will be ignored and the default value of right will be used.