added `rangeOfFirstSubstringMatching:` and corresponding test