<<wordTrunc>>

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.

Syntax

<<wordTrunc stringArg length=lengthParam [start=startParam]>>

Arguments

Parameters