Lua code - System test1 | s = ("%99s"):format("hello")
|
2 | print("|"..s.."|")
|
3 | assert(#s == 99, #s) |
4 | |
5 | --[[ |
6 | s = ("%100s"):format("hello")
|
7 | print("|"..s.."|")
|
8 | assert(#s == 100) |
9 | ]] |
10 | |
11 | return true |
Doesn't work in LuaJ out of the box... hm.
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: | #514 |
| Snippet name: | String format test (%100s) |
| Eternal ID of this version: | #514/1 |
| Text MD5: | 6de846e58ffd9eb538a9ed659a5b550f |
| Author: | stefan |
| Category: | |
| Type: | Lua code - System test |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2015-03-11 14:44:05 |
| Source code size: | 167 bytes / 11 lines |
| Pitched / IR pitched: | No / Yes |
| Views / Downloads: | 1442 / 238 |
| Referenced in: | [show references] |