Site Tools


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


$maxlen(<word list>)


  • 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>.


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.


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


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

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki