The <<wordTrunc...>> function is similar to the <<trunc...>> function in that it will truncate a string to a given length. The length parameter specifies the maximum length of the string and must be provided to the function. The difference between this function and <<trunc...>> is that <<wordTrunc...>> will always end its truncation on a white space. That is, the truncation of the string will be at the end of a whole word.
The string returned by the function will be, at most, the size of the length specified. However, if the specified length ends in the middle of the word, the last white space character before this point will be where the string returned ends.
The start parameter specifies the starting point of the function. If this parameter is given, the function will count from the beginning of the string up to the start character. Then, the function will count from this point up to the length value of characters.
If the string contains no white space, then length number of characters will be returned. If the string is shorter or equal to the length, the entire string will be returned.
<<wordTrunc stringArg length=lengthParam [start=startParam]>>
- stringArg The string value to be truncated by the function. May be a hard coded value, a string data tag, or the return value of another function, provided it returns a string.
- length This required named parameter specifies the maximum length of the string returned by the function.
- start This optional named parameter specifies the starting position from which the function will begin counting. Any characters before this position will be truncated, as will any characters beyond the value of the length parameter. If this parameter is not present, the starting position will always be the first character of the string, as specified by the from parameter.