React Native Requires Chilkat v11.1.0+
React Native
HTML Entity Encode and Decode in StringBuilder
Demonstrates HTML encoding and decoding the contents of a StringBuilder.Chilkat React Native Downloads
import { StringBuilder } from '@chilkat/react-native'
function chilkatExample() {
const sb = new StringBuilder();
const s = '< é ü ç Ω Hello & World ✓ >';
sb.append(s);
sb.encode('html', 'utf-8');
console.log(sb.getAsString());
// Output:
// < é ü ç Ω Hello & World ✓ >
// To decode:
sb.decode('html', 'utf-8');
console.log(sb.getAsString());
// Output:
// < é ü ç Ω Hello & World ✓ >
}