Mercurial > hg > egg-tcls
changeset 314:1cf897164a25
utillib: Add utl_match_delim_list helper function.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Fri, 27 Feb 2015 17:38:27 +0200 |
parents | 8175ef52889b |
children | 7a987b22a817 |
files | utillib.tcl |
diffstat | 1 files changed, 10 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/utillib.tcl Fri Feb 27 14:38:25 2015 +0200 +++ b/utillib.tcl Fri Feb 27 17:38:27 2015 +0200 @@ -50,6 +50,16 @@ } +proc utl_match_delim_list {ulist ustr} { + foreach ukey [split $ulist ";"] { + if {[string match $ukey $ustr} { + return 1 + } + } + return 0 +} + + ### ### SQL database handling ###