delphi里没有c#的stringbuilder类吧

解决方案 »

  1.   

    > delphi里没有c#的stringbuilder类吧
      

  2.   

    > delphi里没有c#的stringbuilder类吧有。
    若旧版本没有,可以继承 StringList 后自创一个。
      

  3.   

    大神请给翻译成DELPHI的好吗?
      

  4.   


    function InternetGetCookieEx(pchURL:string; pchCookieName:string; pchCookieData:string;
      pcchCookieData:Integer;dwFlags:Integer; lpReserved:Pointer):Boolean; stdcall; external 'wininet.dll';         //取出Cookie,当登录后才能取
      function  GetCookieString(string url):string;
    var
       cookieData:TStringList;
       datasize:Integer;
     begin             // Determine the size of the cookie
      datasize := 256;
      cookieData = TStringList.Create;
      if( not InternetGetCookieEx(url, null, cookieData.Text, datasize, 0x00002000, null))  then
      begin
         if (datasize < 0)  then
             return null;                 // Allocate stringbuilder large enough to hold the cookie
          if (not InternetGetCookieEx(url, null, cookieData.Text, ref datasize, 0x00002000, null)) then
                 return null;
      end
        return cookieData.ToString();
     end;
    不知道这样行不