Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/radix.lua
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ local new = function()
-- adds a new element to the tree
local add_to_tree = function(word)
local t = j.radix_tree
for char in word:gfind('.') do
for char in word:gmatch('.') do
if t[char] == true or t[char] == nil then
t[char] = {}
end
Expand All @@ -98,7 +98,7 @@ local new = function()
-- removes an element from the tree
local remove_from_tree = function(word)
local t = j.radix_tree
for char in word:gfind('.') do
for char in word:gmatch('.') do
if t[char] == true then
return
end
Expand Down