{%mainunit gfx_utils.pas} function fpgAddTrailingValue(const ALine, AValue: string; ADuplicates: boolean = true): string; begin if ALine = '' then begin result := ALine; Exit; //==> end; if ADuplicates then begin result := ALine + AValue; Exit; //==> end; if (not SameText(Copy(ALine, Length(ALine) - Length(AValue) + 1, Length(AValue)), AValue)) then result := ALine + AValue else result := ALine; end;