in reply to Is there an InString-like function?

Look at index. It finds substrings.

Your example was slightly misleading: index $var, "1,2,3,4,5" >= 0 is not a good way to test if $var is one of these values (as you yourself note). This may have confused some respondents.