Lua code - System test1 | get("#515") -- splitLines
|
2 | |
3 | lines = splitLines("hello\nworld\r\nyes")
|
4 | |
5 | for _, l in ipairs(lines) do |
6 | print("line: "..l)
|
7 | end |
8 | |
9 | assert(#lines == 3, #lines) |
10 | assert(lines[2] == 'world') |
11 | return true |
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: | #516 |
| Snippet name: | splitLines test |
| Eternal ID of this version: | #516/1 |
| Text MD5: | 9414c74a0546cb99e3349a59280a9abc |
| Author: | stefan |
| Category: | |
| Type: | Lua code - System test |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2015-03-11 15:02:29 |
| Source code size: | 202 bytes / 11 lines |
| Pitched / IR pitched: | No / Yes |
| Views / Downloads: | 921 / 206 |
| Referenced in: | [show references] |