首页
文章
活动
博客
图书
招聘
Search
登录
注册
ruby小记录:随机生成字符串
2011-03-29
刘俊
rand(2**256).to_s(36)[0...n]
#n表示生成几位
链接:http://blog.logeek.fr/2009/7/2/creating-small-unique-tokens-in-ruby
0
该文章对我有帮助
516°
/
5167 人阅读
/
0 条评论
发表评论
请
登录
后发表评论
刘俊
访客 94873
刘俊
的其他博文
更多
FFI::NotFoundError: Function '_get_errno' not found in [msvcrt.dll]
ruby随机取值不重复
watir-webdriver remote control报错 The path to the driver executabl...
ruby用dump写yaml文件的中文乱码问题
关于watir方法ie.exist?的返回值是数字的解释
ruby获取别的地方路径的方法
ruby通过类名获取所在的路径
scite里面出现数字乱码
watir-webdriver在win7启动IE9的错误
数组里面100个元素,每10个一组输出(ruby)