cistringbuilder
TypeScript icon, indicating that this package has built-in type declarations

0.1.3 • Public • Published

CIStringBuilder

Node.js string builder based on c#

Install

npm install cistringbuilder

Setup

 
var CIStringBuilder = require('cistringbuilder');
 

Constructor

Creates a new string builder object

Example

    var sb = new CIStringBuilder();
    
    var sb = new CIStringBuilder('testing');

append

Appends a string to the string builder

    sb.append('string to append ');

appendLine

Appends a string followed by the \r\n

    sb.appendLine('this string will be appeneded')

appendFormat

Appends a foramtted string e.g

    sb.appendForamt("this {0} will be {1}",['will','refomated']);

this will create a string in the string builder with the {x} replaced with the correct value from the array

toString

This function will convert all the text added to the string builded in to one string.

so sb.toString() would create the following

string to append this string will be appended\r\nthis will be reformated

Package Sidebar

Install

npm i cistringbuilder

Weekly Downloads

1

Version

0.1.3

License

ISC

Last publish

Collaborators

  • codeiain