Add a simple trim to lua

This commit is contained in:
2025-07-21 21:00:11 +02:00
parent 67fd215d0e
commit 052c670627

View File

@@ -179,6 +179,7 @@ function ceil(x) return math.ceil(x) end
function upper(s) return string.upper(s) end
function lower(s) return string.lower(s) end
function format(s, ...) return string.format(s, ...) end
function trim(s) return string.gsub(s, "^%s*(.-)%s*$", "%1") end
-- String split helper
function strsplit(inputstr, sep)