/** * @param array the source to parse * @param currentIndex the current index in the <code>array</code> * @param velocityBlock the buffer where to append matched velocity block * @param context the parser context to put some informations * @return the index in the <code>array</code> after the matched block */ public int getMacroParametersSeparator(char[] array, int currentIndex, StringBuffer velocityBlock, VelocityParserContext context) { int i = currentIndex; i = getWhiteSpaces(array, i, null, context); if (array[i] == ',') { i++; } i = getWhiteSpaces(array, i, null, context); if (velocityBlock != null) { velocityBlock.append(array, currentIndex, i - currentIndex); } return i; }
/** * @param array the source to parse * @param currentIndex the current index in the <code>array</code> * @param velocityBlock the buffer where to append matched velocity block * @param context the parser context to put some informations * @return the index in the <code>array</code> after the matched block */ public int getMacroParametersSeparator(char[] array, int currentIndex, StringBuffer velocityBlock, VelocityParserContext context) { int i = currentIndex; i = getWhiteSpaces(array, i, null, context); if (array[i] == ',') { i++; } i = getWhiteSpaces(array, i, null, context); if (velocityBlock != null) { velocityBlock.append(array, currentIndex, i - currentIndex); } return i; }