TABLE OF CONTENTS


::pwtk::firstWord

SYNOPSIS

proc ::pwtk::firstWord {line} {

PURPOSE

Return the first word from the line where delimiter for words is either space or comma (usefull for parsing namelists from input, where &INPUT,var=value ... / is allowed.

SOURCE

    return [lindex [split [string trim $line] {, }] 0]
}