Maybe i posted too fast, i want the function in order to find out if the placeholder exists in the template that i just loaded into the parser. This in order to be able to skip costly processing. I made a helper class that does the job it looks like this and it's here just for clarification.
type TRtcParseHack = class(TRtcParse) end;
function TRtcParseCheck.HasVariable(const Index: string): boolean;
var
idx: integer;
begin
// return the presence of variable named 'Index'
if Assigned(TRtcParseHack(Self).FVariables) then
begin
idx := TRtcParseHack(Self).FVariables.IndexOf(UpperCase(Trim(Index)));
Result := (idx >= 0) and Assigned(TRtcParseHack(Self).FVariables.Objects[idx]);
end
else
Result := false;
end;
All good,
/Dany