code: private String readUntil(char[] delimiter, boolean returnText) throws IOException, KriptonRuntimeException {
  		int start = position;
  		StringBuilder result = null;
  
  		if (returnText && text != null) {
  			result = new StringBuilder();
  			result.append(text);
  		}
  
  		search: while (true) {
  			if (position + delimiter.length >= limit) {
  				if (start < position && returnText) {
  					if (result == null) {
  						result = new StringBuilder();
  					}
  					result.append(buffer, start, position - start);
  				}
  				if (!fillBuffer(delimiter.length)) {
  					checkRelaxed(UNEXPECTED_EOF);
  					type = COMMENT;
  					return null;
  				}
  				start = position;
  			}
  
  			// TODO: replace with Arrays.equals(buffer, position, delimiter, 0,
  			// delimiter.length)
  			// when the VM has better method inlining
  			for (int i = 0; i < delimiter.length; i++) {
  				if (buffer[position + i] != delimiter[i]) {
  					position++;
  					continue search;
  				}
  			}
  
  			break;
  		}
  
  		int end = position;
  		position += delimiter.length;
  
  		if (!returnText) {
  			return null;
  		} else if (result == null) {
  			return stringPool.get(buffer, start, end - start);
  		} else {
  			result.append(buffer, start, end - start);
  			return result.toString();
  		}
  	}
docs: Reads text until the specified delimiter is encountered. Consumes the
  text and the delimiter.
  
  @param delimiter the delimiter
  @param returnText            true to return the read text excluding the delimiter; false to
  return null.
  @return the string
  @throws IOException Signals that an I/O exception has occurred.
  @throws KriptonRuntimeException the kripton runtime exception