diff --git a/text.lua b/text.lua index 312446f..0a8d987 100644 --- a/text.lua +++ b/text.lua @@ -57,6 +57,10 @@ end trim_right = trim_end +function trim_spacing(text) + return text:match"%s*(.-)%s*" +end + local inputstream_metatable = { __index = {read = function(self, count) local cursor = self.cursor + 1