Results 1 to 1 of 1
  1. #1
    Uksus
    Uksus is offline
    Guest
    Join Date
    2015 Jul
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Getting substring function

    Code:
    function GetSubStr(AInputStr, ABeginStr, AEndStr: String; AInclude: Boolean = False): String;
    var
      s: String;
      sp, ep: Int64;
    begin
      Result := '';
      if pos(ABeginStr, AInputStr) <> 0 then begin
        sp := pos(ABeginStr, AInputStr) + length(ABeginStr);
        s := copy(AInputStr, sp, length(AInputStr));
        ep := pos(AEndStr, s) - 1;
        Result := copy(s, 1, ep);
        if AInclude then
          Result := ABeginStr + Result + AEndStr;
      end;
    end;
    Using:
    Code:
    var
      Result: String;
    begin
      Result := GetSubStr('This my value <123> from string.', '<', '>');
      // value of variable result = 123
    end;

Similar Threads

  1. [Hack] Soul Saver function of abnormal function array of byte~
    By qq5600061 in forum Soul Saver
    Replies: 0
    Last Post: 2016-01-20, 11:23 AM
  2. [Help] X-Trap Function
    By darkcoder in forum Anti-Cheat Systems
    Replies: 0
    Last Post: 2014-01-19, 02:32 AM
  3. Help scan function
    By proseco91 in forum Forsaken World Bots, Hacks, Cheats
    Replies: 0
    Last Post: 2012-07-20, 03:38 PM
  4. [Hack] Console Function
    By Dwar in forum CrossFire Hack
    Replies: 2
    Last Post: 2011-03-14, 02:20 AM
Visitors found this page by searching for:
Nobody landed on this page from a search engine, yet!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •