Minor performance optimization to D3

This commit is contained in:
Logan G 2022-12-03 19:03:50 -07:00
parent ae592b71af
commit 5513d56c4d
Signed by: logan
GPG key ID: E328528C921E7A7A
2 changed files with 2 additions and 2 deletions

View file

@ -7,7 +7,7 @@ function find_duplicates(first, second)
for i = 1, #first do
local char = string.sub(first, i, i)
if string.match(second, char) then
if string.find(second, char) then
if char == string.upper(char) then
return string.byte(char) - string.byte("A") + 27
elseif char == string.lower(char) then

View file

@ -11,7 +11,7 @@ end
function find_duplicates(one, two, three)
for i = 1, #one do
local char = string.sub(one, i, i)
if string.match(two, char) and string.match(three, char) then
if string.find(two, char) and string.find(three, char) then
if char == string.upper(char) then
return string.byte(char) - string.byte("A") + 27
elseif char == string.lower(char) then