code: public static int indexOf(String str, String searchStr, int startPos) {
          if (str == null || searchStr == null) {
              return INDEX_NOT_FOUND;
          }
          // JDK1.2/JDK1.3 have a bug, when startPos > str.length for "", hence
          if (searchStr.length() == 0 && startPos >= str.length()) {
              return str.length();
          }
          return str.indexOf(searchStr, startPos);
      }
docs: <p>Finds the first index within a String, handling <code>null</code>.
  This method uses {@link String#indexOf(String, int)}.</p>
  
  <p>A <code>null</code> String will return <code>-1</code>.
  A negative start position is treated as zero.
  An empty ("") search String always matches.
  A start position greater than the string length only matches
  an empty search String.</p>
  
  <pre>
  StringUtils.indexOf(null, *, *)          = -1
  StringUtils.indexOf(*, null, *)          = -1
  StringUtils.indexOf("", "", 0)           = 0
  StringUtils.indexOf("", *, 0)            = -1 (except when * = "")
  StringUtils.indexOf("aabaabaa", "a", 0)  = 0
  StringUtils.indexOf("aabaabaa", "b", 0)  = 2
  StringUtils.indexOf("aabaabaa", "ab", 0) = 1
  StringUtils.indexOf("aabaabaa", "b", 3)  = 5
  StringUtils.indexOf("aabaabaa", "b", 9)  = -1
  StringUtils.indexOf("aabaabaa", "b", -1) = 2
  StringUtils.indexOf("aabaabaa", "", 2)   = 2
  StringUtils.indexOf("abc", "", 9)        = 3
  </pre>
  
  @param str  the String to check, may be null
  @param searchStr  the String to find, may be null
  @param startPos  the start position, negative treated as zero
  @return the first index of the search String,
  -1 if no match or <code>null</code> string input
  @since 2.0