User Tools

Site Tools


action_write

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
action_write [2018/08/06 19:56]
Niek
action_write [2018/08/07 11:23] (current)
Niek Moved split function from lib to loca function
Line 10: Line 10:
 local M = {} local M = {}
  
-lib require ​"lib";+local function split(s, delimiter) 
 +    local result ​{} 
 +    for match in (s..delimiter):​gmatch("(.-)"..delimiter) do 
 +        table.insert(result,​ match) 
 +    end 
 +    return result 
 +end
  
 function M.check(parameters) function M.check(parameters)
Line 45: Line 51:
  local path = parameters['​TO'​]['​value'​][1];​  local path = parameters['​TO'​]['​value'​][1];​
   
- local parts = lib.split(path, "/"​)+ local parts = split(path, "/"​)
   
  if parts[1] ~= ""​ then  if parts[1] ~= ""​ then
action_write.txt · Last modified: 2018/08/07 11:23 by Niek