本文整理自网络,侵删。
Delphi X秒生成大量垃圾字符
function RandomStr(Digit:Integer):string;
var
i: integer;
s: string;
begin
s := 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
setLength(Result,Digit);
Randomize;
for i := 1 to Digit do //循环次数也就是字节数
begin
Result[I] := s[Random(Length(s)-1)+1];
end;
end;
相关阅读 >>
Delphi 关于选择文件路径 selectdirectory 弹出窗口居中的问题
Delphi unidac 连接mdb access 数据库
更多相关阅读请进入《Delphi》频道 >>