Dart Requires Chilkat v11.1.0+
Dart
HTML Entity Encode and Decode in StringBuilder
Demonstrates HTML encoding and decoding the contents of a StringBuilder.Chilkat Dart Downloads
import 'package:chilkat/chilkat.dart';
void main() {
final sb = CkStringBuilder();
final s = '< é ü ç Ω Hello & World ✓ >';
sb.append(s);
sb.encode('html', 'utf-8');
print(sb.getAsString());
// Output:
// < é ü ç Ω Hello & World ✓ >
// To decode:
sb.decode('html', 'utf-8');
print(sb.getAsString());
// Output:
// < é ü ç Ω Hello & World ✓ >
}