s = ("%99s"):format("hello") print("|"..s.."|") assert(#s == 99, #s) --[[ s = ("%100s"):format("hello") print("|"..s.."|") assert(#s == 100) ]] 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: | 1174 / 184 |
Referenced in: | [show references] |