let str = "Hello World"
template sliceCmpOpt*{s1[r] == s2}(s1: string; r: Slice[Natural]; s2: string): bool =
echo "Should be here"
false
if str[1..3] == "ell":
echo "Should not be here"
Alternatively:
template sliceCmpOpt*{s1[l..h] == s2}(s1: string; l,h: Natural; s2: string): bool =
echo "Should be here"
false
neither work. Am I doing something obviously wrong or is there a trick to TR templates with ranges/slices?