That won't work with strings. You want this function to work with a string range and a char/wchar/dchar element. That's why the ` : ` part is used.