code: public static int fromShortString (String dirstr)
      {
          for (int ii = 0; ii < FINE_DIRECTION_COUNT; ii++) {
              if (SHORT_DIR_STRINGS[ii].equals(dirstr)) {
                  return ii;
              }
          }
          return NONE;
      }
docs: Returns the direction code that corresponds to the supplied short string or {@link #NONE}
  if the string does not correspond to a known direction code.