TABLE OF CONTENTS


::pwtk::trim_postfix

SYNOPSIS

proc ::pwtk::trim_postfix {postfixes filename} {

ARGUMENTS

PURPOSE

Return the filename left-trimmed for the postfix. For example:

      ::pwtk::trim_postfix {relax.in scf.in} file.scf.in
      ::pwtk::trim_postfix {relax.in scf.in} file.relax.in

returns:

      file
      file

SOURCE

    foreach postfix $postfixes {
        set postfix [string trimleft $postfix .]
        lappend rexp "\.$postfix$"
    }
    return [regsub [join $rexp |] $filename {}]
}