Delphi 获取随机汉字的函数

2022-11-19 10:51:39 作者:admin

本文整理自网络,侵删。

 function SuiJiString(const AWeiShu: Integer): string;const  SourceStr: string = '金木水火土日月阴阳水火风雷';var  MyRep: string;  I: Integer;begin  Randomize;  for I := 1 to AWeiShu do  begin    //这里只所以必须加1,是因为SourceStr是从1开始的,而Random是从0开始的,SourceStr[0]就会报错,SourceStr[63]也会报错    MyRep := MyRep + SourceStr[Random(9)+1];  end;  Exit(MyRep);end;
procedure TForm1.FormCreate(Sender: TObject);beginForm1.Caption:=SuiJiString(10);end;

相关阅读 >>

Delphi firedac连接oracle

Delphi shgetfileinfo函数

Delphi7 写过卡巴主动防御服务端

Delphi encddecd 加密解密

字符串截取小例子Delphi源代码

Delphi 双进程监控保护

Delphi获取机器的mac地址

Delphi 判断是否是十六进制数

Delphi 最全_日期格式_dateutils时间单元说明

Delphi 网卡mac地址随机生成函数

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



在线咨询 拨打电话