public boolean isEscaped(final String buffer, final int pos) { return pos > 0 && buffer.charAt(pos) == '\\' && !isEscaped(buffer, pos - 1); }
/** * Return true if the specified character is a whitespace * parameter. Check to ensure that the character is not * escaped and returns true from * {@link #isDelimiterChar}. * * @param buffer The complete command buffer. * @param pos The index of the character in the buffer. * @return True if the character should be a delimiter, false else. */ public boolean isDelimiter(final String buffer, final int pos) { return !isEscaped(buffer, pos) && isDelimiterChar(buffer, pos); }