Sample code for 30+ languages & platforms
Node.js

Load StringTable from a StringBuilder

Demonstrates how to load a StringTable from the text contained in a Chilkat StringBuilder object.

Chilkat Node.js Downloads

Node.js
NODEJS_PRELUDE

function chilkatExample() {

    var success = false;

    var strTab = new chilkat.StringTable();
    var sb = new chilkat.StringBuilder();

    sb.Append("This is line 1\r\n");
    sb.Append("An empty line follows...\r\n");
    sb.Append("\r\n");
    sb.Append("This is line 4\r\n");

    strTab.AppendFromSb(sb);

    var i = 0;
    var numStrings = strTab.Count;
    while (i < numStrings) {
        console.log(i + ": " + strTab.StringAt(i));
        i = i+1;
    }


}

chilkatExample();