strbuffer = require 'strbuffer'
local buf = strbuffer()
buf:append('the', 'answer', 'is', 42) -- Multiple arguments allowed, everything gets `tostring`ed
buf:concat('-')
--> 'the-answer-is-42'
tostring(buf)
--> 'theansweris42'
-- syntactic sugar for buf:concat()
-- Line buffer (concatenated with newline by default)
local document = strbuffer('\n'):append("Heading")
print(document + "line 1" + "line 2")
--> Heading
--> line 1
--> line 2
-
Notifications
You must be signed in to change notification settings - Fork 0
A simple, pure Lua implementation of String buffers using tables.
License
DarkWiiPlayer/lua_strbuffer
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
A simple, pure Lua implementation of String buffers using tables.
Resources
License
Stars
Watchers
Forks
Packages 0
No packages published