code: public int findInContent(String content) {
          int n = content.length();
          int m = pattern.length();
          int skip;
          char val;
  
          for (int i = 0; i <= n - m; i = i + skip) {
              skip = 0;
              for (int j = m - 1; j >= 0; j--) {
                  if (pattern.charAt(j) != content.charAt(i + j)) {
                      val = content.charAt(i + j);
  
                      skip = (occurrence.get(val) != null) ?
                              Math.max(1, j - occurrence.get(val)) :
                              j + 1;
  
                      break;
                  }
              }
  
              if (skip == 0) {
                  return i;
              }
          }
          
          return -1;
      }
docs: Returns the index within this string of the first occurrence of the
  specified substring. If it is not a substring, return -1.
  
  @param content the content where we've to search into
  @return the index of the occurrence or -1 if no occurrence has been found