React Native Requires Chilkat v11.1.0+
React Native
HTML Encoding
Demonstrates HTML encoding and decoding.Chilkat React Native Downloads
import { Crypt2 } from '@chilkat/react-native'
function chilkatExample() {
const crypt = new Crypt2();
let s = '< é ü ç Ω Hello & World ✓ >';
const htmlEncoded = crypt.encodeString(s, 'utf-8', 'html');
console.log(htmlEncoded);
// Output:
// < é ü ç Ω Hello & World ✓ >
// To decode:
s = crypt.decodeString(htmlEncoded, 'utf-8', 'html');
console.log(s);
// Output:
// < é ü ç Ω Hello & World ✓ >
}