Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function MSSL_TSAStuff(TSA, strs: TStrArray; iFrom, iCount: Integer): TStrArray;
- {==============================================================================]
- Created: April 19th, 2013.
- Contributors: Janilabo
- Explanation: Returns TSA stuffed with strs.
- iFrom=start position, iCount=count of chars to stuff with.
- [==============================================================================}
- var
- h, i, l: Integer;
- begin
- l := Length(TSA);
- SetLength(Result, l);
- for i := 0 to (l - 1) do
- Result[i] := Copy(TSA[i], 1, Length(TSA[i]));
- MSSL_IntSetRange(iFrom, 0, (l - 1));
- if (iCount > 0) then
- Delete(Result, iFrom, iCount);
- h := High(strs);
- if (h > -1) then
- begin
- l := Length(Result);
- SetLength(Result, (l + (h + 1)));
- MSSL_IntSetRange(iFrom, 0, l);
- for i := (l + h) downto (iFrom + (h + 1)) do
- Swap(Result[i], Result[(i - (h + 1))]);
- for i := 0 to h do
- Result[(i + iFrom)] := Copy(strs[i], 1, Length(strs[i]));
- end;
- end;
Advertisement
Add Comment
Please, Sign In to add comment