code: public static int lastIndexOf(final String value, final String needle, final int offset,
                                    final boolean caseSensitive) {
          validate(value, NULL_STRING_PREDICATE, NULL_STRING_MSG_SUPPLIER);
          validate(needle, NULL_STRING_PREDICATE, NULL_STRING_MSG_SUPPLIER);
          if (caseSensitive) {
              return value.lastIndexOf(needle, offset);
          }
          return value.toLowerCase().lastIndexOf(needle.toLowerCase(), offset);
      }
docs: This method returns the index within the calling String object of the last occurrence of the specified value, searching backwards from the offset.
  Returns -1 if the value is not found.
  
  @param value         The input String
  @param needle        The search String
  @param offset        The index to start search from
  @param caseSensitive whether search should be case sensitive
  @return Return position of the last occurrence of 'needle'.