Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {==============================================================================]
- Explanation: Returns string of all TSA items binded together. Places glue between the indexes.
- [==============================================================================}
- function TSAConcatEx(TSA: TStrArray; glue: string): string;
- var
- h, i: Integer;
- begin
- Result := '';
- h := High(TSA);
- if (h > -1) then
- begin
- for i := 0 to (h - 1) do
- Result := (Result + string(TSA[i]) + string(glue));
- Result := (Result + string(TSA[i]));
- end;
- end;
- begin
- ClearDebug;
- WriteLn(TSAConcatEx(['This', 'is', 'a', 'test', 'for', 'TSAConcatEx()'], ' '));
- end.
Advertisement
Add Comment
Please, Sign In to add comment