RosettaCodeData/Task/String-matching/Tcl/string-matching-2.tcl
2023-07-01 13:44:08 -04:00

3 lines
153 B
Tcl

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