aboutsummaryrefslogtreecommitdiffstats
path: root/awall/util.lua
diff options
context:
space:
mode:
Diffstat (limited to 'awall/util.lua')
-rw-r--r--awall/util.lua8
1 files changed, 7 insertions, 1 deletions
diff --git a/awall/util.lua b/awall/util.lua
index ad067b7..a7eda03 100644
--- a/awall/util.lua
+++ b/awall/util.lua
@@ -1,6 +1,6 @@
--[[
Utility module for Alpine Wall
-Copyright (C) 2012-2019 Kaarle Ritvanen
+Copyright (C) 2012-2020 Kaarle Ritvanen
See LICENSE file for license details
]]--
@@ -121,6 +121,12 @@ function M.join(a, sep, b)
end
+function M.startswithupper(s)
+ if s == '' then return false end
+ local c = s:sub(1, 1)
+ return c == c:upper()
+end
+
function M.quote(s) return '"'..s:gsub('(["\\])', '\\%1')..'"' end