about summary refs log tree commit diff stats
path: root/src/file.lua
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2022-03-06 16:38:49 -0800
committerKartik K. Agaram <vc@akkartik.com>2022-03-06 16:38:49 -0800
commit6a3098d0e93cff07045f27c231cf30114bb013a1 (patch)
treeed98c3ac12f09ca948917cad6a19a2b05b8c8371 /src/file.lua
parent5758f6c082af702e8e2c6c6e6d88f987b3deedee (diff)
downloadteliva-6a3098d0e93cff07045f27c231cf30114bb013a1.tar.gz
use method syntax where possible
Perhaps this is a bad idea. It feels arbitrary, what methods Lua happens
to include in string and table objects without having to go through the
respective modules.
Diffstat (limited to 'src/file.lua')
-rw-r--r--src/file.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/file.lua b/src/file.lua
index bbf9445..cd71f50 100644
--- a/src/file.lua
+++ b/src/file.lua
@@ -56,9 +56,9 @@ function character_splitting_task(chanin, chanout)
   while true do
     local line = chanin:recv()
     if line == nil then break end
-    local linesz = string.len(line)
+    local linesz = line:len()
     for i=1,linesz do
-      chanout:send(string.sub(line, i, i))
+      chanout:send(line:sub(i, i))
     end
   end
   chanout:send(nil)  -- end of file