Delphi 的 TStringBuilder 可以完美实现Jave ,C#的TStringBuilder功能


本文整理自网络,侵删。

 
function T_SunnySky_SDK.JoinItems(AParamDic: TDictionary<string, string>): string;
var
  sb : TStringBuilder;
  key :  TPair<string,string>;
begin
   if not Assigned(AParamDic)  then
      Result := ''
   else if AParamDic.Count = 0  then
      Result := ''
   else begin
         sb := TStringBuilder.Create;
         try
             for key in AParamDic do
             begin
                 if sb.Length > 0  then
                   sb.Append('&');
 
                 sb.Append(key.Key);
                 sb.Append('=');
                 sb.Append(HTTPEncode(key.Value));
             end;
 
             Result := sb.ToString;
         finally
            sb.Free;
         end;
   end;
end;

来源:https://www.cnblogs.com/starluck/p/10795147.html

相关阅读 >>

Delphi 编写ie代理服务器

Delphi 通用压缩单元

Delphi comobj调用wmplayer播放音乐

Delphi 枚举消息钩子的代码

Delphi 在tmemo中查找文本

Delphi与sqlite3数据库

Delphi 感染u盘

Delphi 判断一个数组的长度用 length 还是 sizeof ?

Delphi winapi: getcurrentthread、getcurrentthreadid、getcurrentprocess、getcurrentprocessid

Delphi注入下载者源代码

更多相关阅读请进入《Delphi》频道 >>



打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...