@NonNull protected static String sortableTitle(@Nullable String title){
  if (title == null) {
    return "";
  }
  title=title.toLowerCase();
  if (title.startsWith("the ")) {
    return title.substring(4);
  }
 else   if (title.startsWith("a ")) {
    return title.substring(2);
  }
 else {
    return title;
  }
}

@ NonNull protected static String sortableTitle ( @ Nullable String title ) { if ( title == null ) { return "" ; } title = title . toLowerCase ( ) ; if ( title . startsWith ( "the " ) ) { return title . substring ( 4 ) ; } else if ( title . startsWith ( "a " ) ) { return title . substring ( 2 ) ; } else { return title ; } }
creates a sortable string from a title , so that leading " the " s and " a " s can be removed . this method will also strip the title ' s original case .
