Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > General Coding
You last visited: Today at 08:06

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[Delphi]SplitString Klasse

Discussion on [Delphi]SplitString Klasse within the General Coding forum part of the Coders Den category.

Reply
 
Old   #1
 
elite*gold: 9
Join Date: Dec 2009
Posts: 1,071
Received Thanks: 819
[Delphi]SplitString Klasse

Sorry für die dumme Frage, aber ich finde in Delphi einfach nicht die Klasse in der die Funktion SplitString() deklariert ist... "Classes" ist es nicht.
.Infinite is offline  
Old 03/16/2011, 22:46   #2
 
elite*gold: 9
Join Date: Dec 2009
Posts: 1,071
Received Thanks: 819
Habs selbst gefunden... War anscheinend doch schon zu spät zum fragen. Wen es interessiert, ich hab diese Funktion im Internet gefunden

PHP Code:
function TXXXXXXXXX.SplitString(const aSeparatoraStringStringaMaxInteger 0): TArrayOfString;
  var
    
istrtcntInteger;
    
sepLenInteger;
    
procedure AddString(aEndInteger = -1);
    var
      
endPosInteger;
    
begin
      
if (aEnd = -1then
        endPos 
:= i
      
else
        
endPos := aEnd 1;
      if (
strt endPosthen
        result
[cnt] := Copy(aStringstrtendPos strt)
      else
        
result[cnt] := '';
      
Inc(cnt);
    
end;
  
begin
    
if (aString '') or (aMax 0then
    begin
      SetLength
(result0);
      EXIT;
    
end;
    if (
aSeparator ''then
    begin
      SetLength
(result1);
      
result[0] := aString;
      EXIT;
    
end;
    
sepLen := Length(aSeparator);
    
SetLength(result, (Length(aStringdiv sepLen) + 1);
    
i     := 1;
    
strt  := i;
    
cnt   := 0;
    while (
<= (Length(aString)- sepLen 1)) do
    
begin
      
if (aString[i] = aSeparator[1]) then
        
if (Copy(aStringisepLen) = aSeparatorthen
        begin
          AddString
;
          if (
cnt aMaxthen
          begin
            SetLength
(resultcnt);
            EXIT;
          
end;
          
Inc(isepLen 1);
          
strt := 1;
        
end;
      
Inc(i);
    
end;
    
AddString(Length(aString));
    
SetLength(resultcnt);
  
end
.Infinite is offline  
Reply


Similar Threads Similar Threads
DELPHI - Who make Exploits, Hacks and Tools with DELPHI?
05/15/2013 - CO2 Programming - 13 Replies
Hi all. Iwith DELPHI, but a dont now. hello, I use Delphi to program and i like someone put here source code of make Exploits, Hacks and Tools bot here, or part of the code. ty to all
Volkswechsel alte Klasse(Classic)->neue Klasse(Cata)
01/30/2011 - World of Warcraft - 13 Replies
Hi, Ich würde meinen Untoten Magier gerne zu einem Goblin Magier verändern. Ich weis auch, dass Goblins Magier sein können aber ich finde keine 100% sicheren Infos ob man auch Untoter->Goblin changen kann! Kennt sich da einer aus? Außerdem wird ja der Ruf der alten Heimatstadt auf die neue gewechselt, also sollte in meinem Fall doch nur von Unterstadt->Goblinstadt geändert werden oder? Was ist das langsame Goblinreittier(60%) und was das Schnelle(100%) zu dem meine Skelettpferde...
[DELPHI&METIN]Wie sind die Delphi Befehle für einen Bot?
03/07/2010 - General Coding - 3 Replies
Hallo liebe com, ich habe mal eine Frage: Ich möchte einen Metin Bot in Delphi schreiben aber ich weiß nicht die Befehle für eine bestimmte Taste senden etc. könnt ihr mir die pls sagen oder per pn geben MfGGGGGG



All times are GMT +1. The time now is 08:07.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.