function replaceSnippetIDs(text, idmap)
return text:gsub("(#%d+)", function(id) return idmap[id] or id end)
endtest 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: | 1390 / 284 |
| Referenced in: | #531 - Process questionnaire #538 - Duplicator, attempt 2 #3000382 - Answer for ferdie (>> t = 1, f = 0) |