RayStudio36 / StringBuilder.lua

StringBuilder module for lua

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

StringBuilder v0.2

StringBuilder module for lua

Installation

The stringbuilder.lua file should be dropped into an existing project and required by it.

StringBuilder = require 'stringbuilder'

Example

sb = StringBuilder()
sb:append(1):append('hello'):append(true)
sb:append(1, 2, 3)
sb:append_format('%d%s', 1, 'hello')
sb:append_line(1, 2, 3)
sb:append_array({1, 2, 3}, ', ')
sb:append_table({a=1, b=2, c=3}, ', ')
str = sb:tostring()
sb:clear()

About

StringBuilder module for lua

License:MIT License


Languages

Language:Lua 100.0%Language:Shell 0.0%