code: public String readUntil(String sentinels)
  	{
  		int index=Integer.MAX_VALUE;
  		for(char s: sentinels.toCharArray())
  		{
  			int i = str.indexOf(s, cursor);
  			if(i>=0)
  				index = Math.min(i, index);
  		}
  			
  		if(index>=0 && index<Integer.MAX_VALUE)
  		{
  			String result = str.substring(cursor, index);
  			cursor = index+1;
  			return result;
  		}
  		throw new ParseException("terminator not found");
  	}
docs: Read everything until one of the sentinel(s), which must exist in the string.
  Sentinel char is read but not returned in the result.