Simple-to-the-task string builder utility.
npm install strbuilder``cli`
npm install strbuilder
`cli`
npm test
`javascript
/ With initialization text /
var sb = require('strbuilder')("Start text");
/ Or no text initialization. /
var sb1 = require('strbuilder')();
sb.append("Hello,").append(" world!");
console.log(sb.toString()) / prints 'Hello, world!' /
console.log(sb.length) /* prints 2.
`
`html
`
`javascript
/ With initialization text /
var sb = stringbuilder("Start text");
/ Or no text initialization. /
var sb1 = stringbuilder();
sb.append("Hello,").append(" world!");
console.log(sb.toString()) / prints 'Hello, world!' /
console.log(sb.length) /* prints 2.
`
- 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.