code: public static String rearstring(final String str, final int reverseIndex) {
          assertStringNotNull(str);
          if (str.length() < reverseIndex) {
              String msg = "The length of the string was smaller than the index:";
              msg = msg + " str=" + str + " reverseIndex=" + reverseIndex;
              throw new StringIndexOutOfBoundsException(msg);
          }
          return str.substring(str.length() - reverseIndex);
      }
docs: Extract rear sub-string by reverse index.
  <pre>
  rearstring("flute", 2)
  returns "te"
  </pre>
  @param str The target string. (NotNull)
  @param reverseIndex The index from rear.
  @return The rear string. (NotNull)