本文整理自网络,侵删。
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 判断一个数组的长度用 length 还是 sizeof ?
Delphi winapi: getcurrentthread、getcurrentthreadid、getcurrentprocess、getcurrentprocessid
更多相关阅读请进入《Delphi》频道 >>