Guest User

Untitled

a guest
Aug 14th, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Delphi 0.86 KB | None | 0 0
  1. unit Unit2;
  2.  
  3. interface
  4. uses sysutils, strutils, classes;
  5.  
  6. function alliances(allystring:string):Tstrings;
  7.  
  8. implementation
  9.  
  10. function getTextBetweenStrings(const source, startStr, endStr: String;
  11.   var offset: Integer; includeSubstrings: Boolean = False): String;
  12. var
  13.   startIndex, endIndex: Integer;
  14. begin
  15.   startIndex := PosEx(startStr, source, offset);
  16.   offset := startIndex + 1;
  17.  
  18.   if (startIndex > 0) then
  19.     begin
  20.     startIndex := startIndex + Length(startStr);
  21.     endIndex := PosEx(endStr, source, startIndex) + Length(endStr);
  22.  
  23.     if not includeSubstrings then
  24.       endIndex := endIndex - Length(endStr)
  25.     else
  26.       startIndex := startIndex - Length(startStr);
  27.  
  28.     Result := MidStr(source, startIndex, endIndex - startIndex);
  29.     end
  30.   else
  31.     Result := '';
  32.  
  33. function alliances(allystring:string):Tstrings;
  34. begin
  35.  
  36. end;
  37.  
  38. end;
  39. end;
Add Comment
Please, Sign In to add comment