word_truncate( length )

Description:

Limit a string to a maximum number of words.

Input:

String to limit.

Parameters:

length

Maximum number of words to allow. If the input string is longer than this amount then the remainder is discarded.

Return:

The input string constrained to the specified length.