delphi TStrings 随机打乱


本文整理自网络,侵删。

 
procedure Shuffle(Strings: TStrings);
var
  i: Integer;
begin
//delphitop.com
  for i := Strings.Count-1 downto 1 do 
    Strings.Exchange(i, Random(i+1));
end;

相关阅读 >>

Delphi listbox自动获取列表框中的组件焦点

Delphi 调用golang dll

Delphi版插apc杀进程驱动源码

Delphi2010中使用pchar时e2010 incompatible types: 'char' and 'ansichar' 错误的处理

Delphi绘制标题栏

Delphi 把exe可执行文件等作为资源包含在Delphi编译文件中

Delphi 检查屏幕是否处于锁屏或关闭状态

Delphi 用dll实现插件的简单演示

Delphi sysutils.stringreplace - 替换

Delphi 调用shellexecute打开txt文本

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



打赏

取消

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

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

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

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

评论

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