-
-
Save zdi-team/f626a1b611ea3899bae4c2cbb3cfddee to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// resolve the variable | |
String varValue = resolveVariable(event, varName, buf, startPos, endPos); | |
if (varValue == null) { | |
varValue = varDefaultValue; | |
} | |
if (varValue != null) { | |
// recursive replace | |
final int varLen = varValue.length(); | |
buf.replace(startPos, endPos, varValue); | |
altered = true; | |
int change = substitute(event, buf, startPos, varLen, priorVariables); | |
change = change + (varLen - (endPos - startPos)); | |
pos += change; | |
bufEnd += change; | |
lengthChange += change; | |
chars = getChars(buf); // in case buffer was altered | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment