blob: c541dcad71eb3cd4680f5a178437133aa6407c19 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
{%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;
|