Data update

This commit is contained in:
Ingy döt Net 2026-04-30 12:34:36 -04:00
parent 4bb20c9b71
commit cbaf4c4b64
12390 changed files with 318560 additions and 27248 deletions

View file

@ -0,0 +1,36 @@
-- Create string.
local s = "abc"
-- Destroy string (not really see notes above).
s = nil
-- (Re)assignment.
s = "def"
-- Comparison.
local b = (s == "abc") -- false
local c = (s <= "ghi") -- true
-- Cloning/copying.
local t = s
-- Check if empty.
s = ""
b = (s != "") -- false
b = (#s == 0) -- true
-- Append a byte.
s ..= "b"
-- Extract a substring.
s = "ghijkl"
t = s:sub(2, 5) -- "hijk"
-- Replace a byte or string.
s = "abracadabra"
s = s:replace("a", "z") -- "zbrzczdzbrz"
-- Join strings.
s = "abc"
t = "def"
local u = s .. t -- "abcdef"