code: protected int indexFirstOf(char[] s, char delim, int offset) {
          if (s == null || s.length == 0) {
              return -1;
          }
          // check boundaries
          if (offset < 0) {
              offset = 0;
          } else if (offset > s.length) {
              return -1;
          }
          for (int i = offset; i < s.length; i++) {
              if (s[i] == delim) {
                  return i;
              }
          }
          return -1;
      }
docs: Get the earlier index that to be searched for the first occurrance in
  one of any of the given array.
  
  @param s the character array to be indexed
  @param delim the delimiter used to index
  @param offset The offset.
  @return the ealier index if there is a delimiter