TABLE OF CONTENTS


::pwtk::trimAllLines

SYNOPSIS

proc ::pwtk::trimAllLines {text} {

PURPOSE

Trim all lines for whitespaces and skip all empty lines.

SOURCE

    set text [string trim $text]
    set result {}
    foreach line [split [string trim $text] \n] {
        set line [string trim $line]
        if { $line ne {} } {
            append result $line\n
        }
    }
    return [string trim $result]    
}