The indexOfString is slightly faster for direct access, but somewhat slower for indirect. That's because indexOf(String) is a JVM intrinsic: its Java code is ... ... <看更多>
In the case of indexOf() , one of those factors is the expected size of strings. ... so a Unicode character does not always fit in a Java character. ... <看更多>