Use string.Contains instead of IndexOf comparison
ProprietaryReplace s.IndexOf(x) >= 0 with s.Contains(x) and s.IndexOf(x) == -1 with !s.Contains(x).
OpenRewrite. Recipes. CSharp. CodeQuality. Style. UseStringContainsmod run . --recipe= OpenRewrite. Recipes. CSharp. CodeQuality. Style. UseStringContainsInstall it once, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.