String.indexOf()
String.lastIndexOf()
建议通过快速修复将此类字符串字面量替换为等效的字符字面量,从而获得一些性能增强。
示例:
return s.indexOf("x");
在应用快速修复后:
return s.indexOf('x');