mirror of
https://github.com/sbrl/Minetest-WorldEditAdditions.git
synced 2024-11-04 15:23:02 +00:00
Merge branch 'vortechnix' of https://github.com/sbrl/Minetest-WorldEditAdditions into vortechnix
This commit is contained in:
commit
851dde84f8
1 changed files with 1 additions and 3 deletions
|
@ -4,7 +4,6 @@
|
||||||
-- @param rem_dups bool Remove duplicate characters
|
-- @param rem_dups bool Remove duplicate characters
|
||||||
-- @returns table A sequence table containing the substrings
|
-- @returns table A sequence table containing the substrings
|
||||||
function worldeditadditions.tochars(text,sort,rem_dups)
|
function worldeditadditions.tochars(text,sort,rem_dups)
|
||||||
--function tochars(text,s,d)
|
|
||||||
local t, set = {}, {}
|
local t, set = {}, {}
|
||||||
if rem_dups then
|
if rem_dups then
|
||||||
text:gsub(".",function(c) set[c] = true end)
|
text:gsub(".",function(c) set[c] = true end)
|
||||||
|
@ -18,11 +17,10 @@ function worldeditadditions.tochars(text,sort,rem_dups)
|
||||||
return t
|
return t
|
||||||
end
|
end
|
||||||
|
|
||||||
--- Split into set of characters.
|
--- Split into a set of characters.
|
||||||
-- @param text string The string to iterate over
|
-- @param text string The string to iterate over
|
||||||
-- @returns table A sequence set table containing the substrings
|
-- @returns table A sequence set table containing the substrings
|
||||||
function worldeditadditions.tocharset(text)
|
function worldeditadditions.tocharset(text)
|
||||||
-- function tocharset(text)
|
|
||||||
local t = {}
|
local t = {}
|
||||||
text:gsub(".",function(c) t[c] = true end)
|
text:gsub(".",function(c) t[c] = true end)
|
||||||
return t
|
return t
|
||||||
|
|
Loading…
Reference in a new issue