summaryrefslogtreecommitdiffstats
path: root/acf/persistence/backends/files.lua
diff options
context:
space:
mode:
authorKaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>2013-06-28 23:50:18 +0300
committerKaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>2013-09-04 15:24:08 +0300
commit4c1cc6f54edc35a4aa2f1553bc9ce372a2b77695 (patch)
treed4142961891040a433add8ea3d350be4c6d58471 /acf/persistence/backends/files.lua
parent25ffc62a5b2c9a65e5c1689d5351adcf8cbef7e2 (diff)
downloadaconf-4c1cc6f54edc35a4aa2f1553bc9ce372a2b77695.tar.bz2
aconf-4c1cc6f54edc35a4aa2f1553bc9ce372a2b77695.tar.xz
eliminate explicit use of string module
Diffstat (limited to 'acf/persistence/backends/files.lua')
-rw-r--r--acf/persistence/backends/files.lua12
1 files changed, 6 insertions, 6 deletions
diff --git a/acf/persistence/backends/files.lua b/acf/persistence/backends/files.lua
index b14ed10..7d03e12 100644
--- a/acf/persistence/backends/files.lua
+++ b/acf/persistence/backends/files.lua
@@ -17,9 +17,9 @@ local function get_scope(top)
return
end
- return stringy.startswith(top.scope, '/files/') and string.sub(
- top.scope, 7, -1
- ) or nil
+ return stringy.startswith(
+ top.scope, '/files/'
+ ) and top.scope:sub(7, -1) or nil
end
@@ -47,9 +47,9 @@ function backend:get(path, top)
assert(scope)
scope = scope..'/'
- local slen = string.len(scope)
- assert(string.sub(target, 1, slen) == scope)
- return string.sub(target, slen + 1, -1)
+ local slen = scope:len()
+ assert(target:sub(1, slen) == scope)
+ return target:sub(slen + 1, -1)
elseif t == 'directory' then
local res = {}