table.insert to ptr ref improvement, sites doc update (#11113)

* table.insert to ptr ref improvement

* Updated sites doc
This commit is contained in:
GabrieleDeri 2026-10-22 16:47:05 +02:00 • committed by GitHub
parent 7798a478ae
commit ab445aab93
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
50 changed files with 205 additions and 169 deletions

View file

@ -14,12 +14,12 @@ function split(s, delimiter)
if delimiter == nil then
-- No delimiter, split all characters
for match in s:gmatch"." do
table.insert(result, match);
result[#result + 1] = match;
end
else
-- Split by delimiter
for match in (s..delimiter):gmatch("(.-)"..delimiter) do
table.insert(result, match);
result[#result + 1] = match;
end
end
end