
proc lmatch_prefix {list str} {
    set matches [list]

    foreach el $list {
	if {[string first $str $el] == 0} {
	    lappend matches $el
	}
    }

    return $matches
}

proc ltrimleft {list n} {
    set result [list]

    foreach el $list {
	lappend result [string range $el $n end]
    }

    return $result
}
