Sample code for 30+ languages & platforms
Rust

StringBuilder EntityDecode

Demonstrates the Chilkat StringBuilder EntityDecode method to decode HTML entities.

Chilkat Rust Downloads

Rust
// Decode the following HTML entities, replacing each with the character represented.
let s = "é é é Latin small letter e with acute".to_string();

let sb = chilkat::StringBuilder::new();

let _ = sb.append(&s);
let _ = sb.entity_decode();

// Output: é é é Latin small letter e with acute
println!("{}", sb.get_as_string().unwrap_or_default());