Jump to content

Module:Swap: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
Fixed
...
 
Line 5: Line 5:
y = frame.args[3]
y = frame.args[3]
sep = frame.args[2] or frame.args.sep
sep = frame.args[2] or frame.args.sep
x,y = y,sep,x
x,y = '' .. y .. '' .. sep .. '' .. x .. ''
return x,y
return x,y
end
end

Latest revision as of 20:56, 9 April 2025

local p = {}

function p.main(frame)
  x = frame.args[1]
  y = frame.args[3]
  sep = frame.args[2] or frame.args.sep
  x,y = '' .. y .. '' .. sep .. '' .. x .. ''
  return x,y
end
return p