-- Check if value is a number within range function validate.is_in_range(val, min, max) return type(val) == "number" and val >= min and val <= max end
-- Check if table is non-empty function validate.non_empty_table(tbl) return type(tbl) == "table" and next(tbl) ~= nil end script luar
-- Simple execution timer (prints elapsed time) function debug_utils.time_function(func, ...) local start = os.clock() local results = {func(...)} local elapsed = os.clock() - start print(string.format("Execution time: %.4f seconds", elapsed)) return table.unpack(results) end -- Check if value is a number within range function validate
file_utils.write_file("test.txt", "Lua rocks!") print(file_utils.read_file("test.txt")) = min and val <