#540 display pocket connecting failure reasons

This commit is contained in:
Mikayla Fischler
2024-08-25 20:29:52 -04:00
parent b3be2d4bfc
commit 5a38acf2a7
6 changed files with 41 additions and 4 deletions

View File

@@ -110,6 +110,15 @@ function util.pad(str, n)
return t_concat{util.spaces(lpad), str, util.spaces(rpad)}
end
-- trim leading and trailing whitespace
---@nodiscard
---@param s string text
---@return string
function util.trim(s)
local str = s:gsub("^%s*(.-)%s*$", "%1")
return str
end
-- wrap a string into a table of lines
---@nodiscard
---@param str string