mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-01-24 02:40:05 +08:00
18 lines
353 B
Lua
18 lines
353 B
Lua
--!/usr/bin/lua
|
|
local M = {}
|
|
|
|
function M.generate_simple(len) -- {{{
|
|
local temp = vim.split('abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ', '')
|
|
local ps = {}
|
|
local i = 0
|
|
while i < len do
|
|
table.insert(ps, temp[math.random(#temp)])
|
|
i = i + 1
|
|
end
|
|
return table.concat(ps, '')
|
|
end
|
|
-- }}}
|
|
--
|
|
--
|
|
return M
|