Site Tools


maxlen

# $EPIC: maxlen.txt,v 1.1.1.1 2006/07/11 04:57:43 jnelson Exp $

Synopsis:

$maxlen(<word list>)

Technical:

  • If the <word list> argument is omitted the value 0 is returned.
  • The return value is the length of the longest word in <word list>.

Practical:

If you want to “line up” a list of words into columns, you need to know how wide your columns should be, and that is determined by the “widest” word. This function will give you that value, so you can compute how wide your columns should be and how many you can fit on the screen.

Returns:

The length in characters of the longest word in <word list>

Examples:

$maxlen()                     returns 0
$maxlen(one)                  returns 3
$maxlen(one two three four)   returns 5
maxlen.txt · Last modified: 2006/07/11 04:57 by 127.0.0.1