RosettaCodeData/Task/String-matching/Tcl/string-matching-2.tcl
2015-02-20 09:02:09 -05:00

3 lines
153 B
Tcl

set isPrefix [string match $needle* $haystack]
set isContained [string match *$needle* $haystack]
set isSuffix [string match *$needle $haystack]