Autor Beitrag
huuuuuh
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 665
Erhaltene Danke: 19

win xp, (win vista), win 7
VS 2008 Express Edition, VS 2010 Express Edition, VS 2010 Professionell
BeitragVerfasst: Sa 12.04.08 12:04 
also ich hab hier den php-befehl urlencode()
gibt es dazu eine delphi entsprechung?
Xion
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
EE-Maler
Beiträge: 1952
Erhaltene Danke: 128

Windows XP
Delphi (2005, SmartInspect), SQL, Lua, Java (Eclipse), C++ (Visual Studio 2010, Qt Creator), Python (Blender), Prolog (SWIProlog), Haskell (ghci)
BeitragVerfasst: Sa 12.04.08 13:13 

_________________
a broken heart is like a broken window - it'll never heal
In einem gut regierten Land ist Armut eine Schande, in einem schlecht regierten Reichtum. (Konfuzius)
huuuuuh Threadstarter
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 665
Erhaltene Danke: 19

win xp, (win vista), win 7
VS 2008 Express Edition, VS 2010 Express Edition, VS 2010 Professionell
BeitragVerfasst: Sa 12.04.08 13:43 
huuuuuh Threadstarter
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 665
Erhaltene Danke: 19

win xp, (win vista), win 7
VS 2008 Express Edition, VS 2010 Express Edition, VS 2010 Professionell
BeitragVerfasst: Sa 12.04.08 16:49 
und in umgekehrter richtung? kann weder hier oder woanders was finden...
Hidden
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 2242
Erhaltene Danke: 55

Win10
VS Code, Delphi 2010 Prof.
BeitragVerfasst: Sa 12.04.08 17:31 
Hi,

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
function removeUrlcode(AStr: string): string;
var
  tmpPos: integer;
begin
  // Die + zu blank Konvertierung ist nur bei RawUrlencode notwendig
  tmpPos := Pos('+',AStr);
  while tmpPos > 0 do begin  // Solange '+' vorhanden sind
    AStr[tmpPos] := ' ';  //  + in Leerzeichen ändern
    tmpPos := Pos('+',AStr);
  ed;
  tmpPos := Pos('%',AStr);
  while tmpPos > 0 do  // solange konvertierte Sonderzeichen vorhanden sind
  begin
    AStr[tmpPos] := Char( StrToInt('$'+Copy(AStr,tmpPos+1,2)) );  // %-Zeichen durch Sonderzeichen ersetzen
    Delete(AStr,tmpPos+1,2);  // Die 2 Ziffern nach dem % entfernen
    tmpPos := Pos('%',AStr);
  end;
  result := AStr;
end;


mfG,

_________________
Centaur spears can block many spells, but no one tries to block if they see that the spell is a certain shade of green. For this purpose it is useful to know some green stunning hexes. (HPMoR)