React Native
React Native
Load StringTable from a StringBuilder
Demonstrates how to load a StringTable from the text contained in a Chilkat StringBuilder object.Chilkat React Native Downloads
import { StringBuilder, StringTable } from '@chilkat/react-native'
function chilkatExample() {
const strTab = new StringTable();
const sb = new 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);
let i = 0;
const numStrings = strTab.count;
while (i < numStrings) {
console.log(`${i}: ${strTab.stringAt(i)}`);
i++;
}
}