Function rphtml::entity::decode_chars[][src]

pub fn decode_chars(chars: &[char]) -> Vec<char, Global>

Notable traits for Vec<u8, Global>

impl Write for Vec<u8, Global>

Decode character list, replace the entity characters into a unicode character.

Examples

use htmlentity::entity::*;

let char_list = vec!['<'];
assert_eq!(decode_chars(&"&lt;".chars().collect::<Vec<char>>()), char_list);
assert_eq!(decode_chars(&"&#60;".chars().collect::<Vec<char>>()), char_list);
assert_eq!(decode_chars(&"&#x3c;".chars().collect::<Vec<char>>()), char_list);