TABLE OF CONTENTS


::pwtk::trimText

SYNOPSIS

proc ::pwtk::trimText {text} {

PURPOSE

Trim lines for whitespaces and skip leading and trailing empty lines.

SOURCE

    set text [string trim $text]
    set result [lmap line [split $text \n] {string trim $line}]    
    return [join $result \n]    
}