stringbuilder
Simple-to-the-task string builder utility.
Installation
npm install strbuilder
Test
npm test
Usage in Node
/* With initialization text */ var sb = "Start text"; /* Or no text initialization. */ var sb1 = ; sb; console /* prints 'Hello, world!' */ console /* prints 2.
Usage in Browser
<!-- include it at the head section of your page -->
/* With initialization text */ var sb = ; /* Or no text initialization. */ var sb1 = ; sb; console /* prints 'Hello, world!' */ console /* prints 2.
Property and methods
length:
tells us the number of different string appended to it.toString:
returns all the strings in it, joined together.append:
adds a string to the string builder.
Thanks all.