resources/src/main/java/org/robolectric/res/android/String8.java
private int find_extension()
{
    int lastSlashIndex;

    final StringBuilder str = mString;
    // only look at the filename
    lastSlashIndex = str.lastIndexOf(File.pathSeparator);
    if (lastSlashIndex == -1) {
      lastSlashIndex = 0;
    } else {
      lastSlashIndex++;
    }
    // find the last dot
    return str.lastIndexOf(".", lastSlashIndex);
}
private int find_extension()
{
    int lastSlashIndex;

    final StringBuilder str = mString;
    // only look at the filename
    lastSlashIndex = str.lastIndexOf(File.pathSeparator);
    if (lastSlashIndex == -1) {
      lastSlashIndex = 0;
    } else {
      lastSlashIndex++;
    }
    // find the last dot
    return str.lastIndexOf(".", lastSlashIndex);
}
/*
Helper function for finding the start of an extension in a pathname.

Returns a index inside mString, or -1 if no extension was found.