Tutorial by Examples

--- trim: a string-trimming module for Lua -- Author, date, perhaps a nice license too -- -- The code here is taken or adapted from material in -- Programming in Lua, 3rd ed., Roberto Ierusalimschy -- trim_all(string) => return string with white space trimmed on both sides local trim_al...
-- The following assumes that trim module is installed or in the caller's package.path, -- which is a built-in variable that Lua uses to determine where to look for modules. local trim = require "trim" local msg = " Hello, world! " local cleaned = trim.trim_all(msg)...

Page 1 of 1