lightsb
v1.0.10
Published
Simple light string builder
Downloads
9
Maintainers
Readme
📥 Download
$ npm install lightsb
🏃 Quick start
const capacity: number = 7;
const builder: IStringBuilder = new StringBuilder("content", capacity);
builder.setCapacity(1024);
builder.append("first thing").append(420);
builder.appendRepeat("repeat 3 this times", 3);
builder.appendLine("new-line terminated")
builder.appendLineRepeat("3 lines here", 3);
builder.appendLines("line 1", "line 2", "...");
builder.appendEmptyLine();
builder.appendEmptyLines(42);
builder.setContent("content");
builder.clear();
const equals: boolean = builder.equals("other");
const isEmpty: boolean = builder.isEmpty();
const sub: string | undefined = builder.substring(0, 32);
const content: string | undefined = builder.toString();
📝 License
This project is MIT licensed.
👑 Credits
- Icon: Engineer icons created by Freepik - Flaticon
- README design: github.com/amitmerchant1990