function replaceSnippetIDs(text, idmap) return text:gsub("(#%d+)", function(id) return idmap[id] or id end) end
test run test run with input download show line numbers
Travelled to 12 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #533 |
Snippet name: | replaceSnippetIDs |
Eternal ID of this version: | #533/1 |
Text MD5: | 4dccf41c5737071d6c9453ba9cb93681 |
Author: | stefan |
Category: | |
Type: | Lua code |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2015-03-15 03:20:33 |
Source code size: | 115 bytes / 3 lines |
Pitched / IR pitched: | No / Yes |
Views / Downloads: | 705 / 163 |
Referenced in: | [show references] |