• Noel Grandin's avatar
    Convert indexOf->startsWith and lastIndexOf->endsWith · e2451bd7
    Noel Grandin yazdı
    This is both an optimisation and a cleanup.
    
    This converts code like
       aStr.indexOf("XX") == 0
    to
      aStr.startsWith("XX")
    and converts code like
      aStr.lastIndexOf("XXX") == aStr.getLength() - 3
    to
      aStr.endsWith("XXX")
    
    Note that in general
      aStr.lastIndexOf("X") == aStr.getLength() - 1
    converts to
      aStr.isEmpty() || aStr.endsWith("X")
    so I used the surrounding context to determine if aStr could be empty
    when modifying the code.
    
    Change-Id: I22cb8ca7c2a4d0288b001f72adb27fd63af87669
    e2451bd7
Adı
Son kayıt (commit)
Son güncelleme
..
core Loading commit data...
crypto Loading commit data...
docprop Loading commit data...
drawingml Loading commit data...
dump Loading commit data...
export Loading commit data...
helper Loading commit data...
mathml Loading commit data...
ole Loading commit data...
ppt Loading commit data...
shape Loading commit data...
token Loading commit data...
vml Loading commit data...