"Truncate" Function

$Truncate function returns substring of the first parameter with the length defined by the second parameter.
The function has the following parameters:

  1. Pattern.
  2. Length, positive integer. If the first parameter's value is longer than "Length" the function returns substring. The whole value will be returned otherwise.

Important: extra () pair is required for patterns that contain ','.


  1. $Truncate($Lib(FirstNames) A. $Lib(LastNames),20)
  2. $Truncate(($Rint(1,250), $Lib(Streets)),20)