AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

Bitte um Hilfe [C++ -> Delphi]

Ein Thema von elyesa · begonnen am 3. Mär 2010 · letzter Beitrag vom 3. Mär 2010
 
elyesa

Registriert seit: 15. Apr 2005
8 Beiträge
 
#4

Re: Bitte um Hilfe [C++ -> Delphi]

  Alt 3. Mär 2010, 16:50
hello,
danke für die hinweise.

also wenn ich nach den kommentar gehe "//strstr without case" wird hier nach einem string im string gesucht.
jedoch verstehe ich nicht warum die funktion als ergebnis einen pchar zurück gibt.

diese funktion wird wie folgt aufgerufen im c++ programm:

Code:
if (stristr(rInformation.pContentType, "image/") ||
    stristr(rInformation.pContentType, "video/") ||
    stristr(rInformation.pContentType,  "audio/") ||
   (stristr(rInformation.pContentType, "application/") && !stristr(rInformation.pContentType, "java")))
  //Don't send the reply
  rServerCheck=false;*/
meint ihr es wäre ok wenn ich diese funktion mit dieser ersetze (delhi fundamentals ):

Delphi-Quellcode:
function StrPMatchLen(const P: PAnsiChar; const Len: Integer;
    const M: CharSet): Integer;
var Q: PAnsiChar;
    L: Integer;
begin
  Q := P;
  L := Len;
  Result := 0;
  While L > 0 do
    if Q^ in M then
      begin
        Inc(Q);
        Dec(L);
        Inc(Result);
      end else
      exit;
end;

function StrMatchChar(const S: AnsiString; const M: CharSet): Boolean;
var L: Integer;
begin
  L := Length(S);
  Result := (L > 0) and (StrPMatchLen(Pointer(S), L, M) = L);
end;
danke und gruss
  Mit Zitat antworten Zitat
 


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 00:09 Uhr.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz