private void replace_VaOpt(StringBuffer buf, boolean hadVarArgs) {
		int optIdx = buf.indexOf("__VA_OPT__");
		if (optIdx < 0) {
			return;
		}

		int lparen = buf.indexOf("(", optIdx + 1);
		if (lparen < 0) {
			return;
		}

		int rparen = buf.indexOf(")", lparen + 1);
		if (rparen < 0) {
			return;
		}

		// get in between string.
		String replarg = buf.substring(lparen + 1, rparen);
		if (hadVarArgs) {
			buf.replace(optIdx, rparen + 1, replarg);
		}
		else {
			buf.replace(optIdx, rparen + 1, "");
		}
	}
Replace __VA_OPT__(arg) in buf with either the arg to __VA_OPT__
if there were any VARARGS, otherwise with ""
@param buf string buffer to replace __VA_OPT__(value) within
@param hadVarArgs
Ghidra/Features/Base/src/main/java/ghidra/app/util/cparser/CPP/DefineTable.java