Home
Random
Recent changes
Special pages
Community portal
Preferences
About Stockhub
Disclaimers
Search
User menu
Talk
Contributions
Create account
Log in
Editing
Module:Sandbox/Jc86035/1
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
--[[ This is a module for use in substitution and replacement of Template:Infobox MTR station on MTR Light Rail articles. ]] p = {} function p.main(frame) local routes, tmp, result = frame.args[1] or '', {}, {} for k, v in ipairs({'614P', '615P', '751P'}) do if mw.ustring.find(routes, v) then tmp[v] = true routes = mw.ustring.gsub(routes, v, '') end end for k, v in ipairs({'505', '507', '610', '614', '615', '705', '706', '751', '761P'}) do if mw.ustring.find(routes, v) then tmp[v] = true end end for k, v in ipairs({'505', '507', '610', '614', '614P', '615', '615P', '705', '706', '751', '751P', '761P'}) do if tmp[v] then table.insert(result, v) end end if #result > 1 then return 'routes '..mw.text.listToText(result) end if #result > 0 then return 'route '..mw.text.listToText(result) end end return p
Summary:
Please note that all contributions to Stockhub may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Stockhub:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Template used on this page:
Module:Sandbox/Jc86035/1/doc
(
edit
)