arg.setLength(0); quoteStart = -1; } else if (!isEscapeChar(buffer, i)) { arg.setLength(0); // reset the arg } else if (!isEscapeChar(buffer, i)) { arg.append(buffer.charAt(i));
arg.setLength(0); quoteStart = -1; } else if (!isEscapeChar(buffer, i)) { arg.setLength(0); // reset the arg } else if (!isEscapeChar(buffer, i)) { arg.append(buffer.charAt(i));
/** * Check if a character is escaped (i.e. if the previous character is an escape) * * @param buffer * the buffer to check in * @param pos * the position of the character to check * @return true if the character at the specified position in the given buffer is an escape character and the character immediately preceding it is not an * escape character. */ public boolean isEscaped(final CharSequence buffer, final int pos) { if (pos <= 0) { return false; } return isEscapeChar(buffer, pos - 1); }
/** * Check if a character is escaped (i.e. if the previous character is an escape) * * @param buffer * the buffer to check in * @param pos * the position of the character to check * @return true if the character at the specified position in the given buffer is an escape character and the character immediately preceding it is not an * escape character. */ public boolean isEscaped(final CharSequence buffer, final int pos) { if (pos <= 0) { return false; } return isEscapeChar(buffer, pos - 1); }