public static int firstCharNotInSet(int startIndex, String str, String charSet)
	  {
	    int searchIndex = startIndex - 1;  // we add one at the end.
	    int length      = str.length();

	    //    System.out.print("\nSearching \"" + str + "\" for \"" + charSet + "\" from index " + startIndex);
	    try {
	      for (int i = startIndex;
	           ((i < length) && (charSet.indexOf(str.charAt(i)) >= 0));
	           ++i)
	        searchIndex = i;
	    }
	    catch (StringIndexOutOfBoundsException e) {
	      System.err.println("Hey, got a bad string index in 'firstCharNotInSet'!"); 
	    }

	    //    System.out.println("...returning " + searchIndex);
	    return searchIndex + 1;
	  }