Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (*функция формирования состояния партии*)
- function GetPart(Delimetr : Char; Number : Integer; Str : String) : String;
- var str1, str2 : String;
- index, oldindex, index2, i : Integer;
- begin
- str := str + delimetr;
- index := Length(str);
- oldindex := 0;
- for i := 1 to number do
- begin
- str1 := Copy(str, index + 1 + oldindex , Length(str) - (index + 1));
- index := Pos(Delimetr, str1);
- oldindex := oldindex + index;
- end;
- index := oldindex;
- str2 := Copy(str, index+1, length(str) - index + 1);
- index2 := Pos(Delimetr, str2);
- result := Copy(str, index + 1, index2 - 1);
- end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement