resources/src/main/java/org/robolectric/res/android/ResourceUtils.java
static boolean ExtractResourceName(String str, Ref<String> out_package, Ref<String> out_type,
                           final Ref<String> out_entry) {
    out_package.set("");
    out_type.set("");
    boolean has_package_separator = false;
    boolean has_type_separator = false;
    int start = 0;
    int end = start + str.length();
    int current = start;
    while (current != end) {
      if (out_type.get().length() == 0 && str.charAt(current) == '/') {
        has_type_separator = true;
        out_type.set(str.substring(start, current));
        start = current + 1;
      } else if (out_package.get().length() == 0 && str.charAt(current) == ':') {
        has_package_separator = true;
        out_package.set(str.substring(start, current));
        start = current + 1;
      }
      current++;
    }
    out_entry.set(str.substring(start, end));

    return !(has_package_separator && out_package.get().isEmpty()) &&
           !(has_type_separator && out_type.get().isEmpty());
  }
static boolean ExtractResourceName(String str, Ref<String> out_package, Ref<String> out_type,
                           final Ref<String> out_entry) {
    out_package.set("");
    out_type.set("");
    boolean has_package_separator = false;
    boolean has_type_separator = false;
    int start = 0;
    int end = start + str.length();
    int current = start;
    while (current != end) {
      if (out_type.get().length() == 0 && str.charAt(current) == '/') {
        has_type_separator = true;
        out_type.set(str.substring(start, current));
        start = current + 1;
      } else if (out_package.get().length() == 0 && str.charAt(current) == ':') {
        has_package_separator = true;
        out_package.set(str.substring(start, current));
        start = current + 1;
      }
      current++;
    }
    out_entry.set(str.substring(start, end));

    return !(has_package_separator && out_package.get().isEmpty()) &&
           !(has_type_separator && out_type.get().isEmpty());
  }
static boolean ExtractResourceName ( String str , Ref < String > out_package , Ref < String > out_type , final Ref < String > out_entry ) { out_package . set ( "" ) ; out_type . set ( "" ) ; boolean has_package_separator = false ; boolean has_type_separator = false ; int start = 0 ; int end = start + str . length ( ) ; int current = start ; while ( current != end ) { if ( out_type . get ( ) . length ( ) == 0 && str . charAt ( current ) == ' ' ) { has_type_separator = true ; out_type . set ( str . substring ( start , current ) ) ; start = current + 1 ; } else if ( out_package . get ( ) . length ( ) == 0 && str . charAt ( current ) == ' ' ) { has_package_separator = true ; out_package . set ( str . substring ( start , current ) ) ; start = current + 1 ; } current ++ ; } out_entry . set ( str . substring ( start , end ) ) ; return ! ( has_package_separator && out_package . get ( ) . isEmpty ( ) ) && ! ( has_type_separator && out_type . get ( ) . isEmpty ( ) ) ; }
}
}