Skip to main content

tokenize

Function tokenize 

Source
pub fn tokenize(html: &str) -> Tokenizer<'_> 
Expand description

Create a streaming Tokenizer over html without building a tree.

use domtree::Token;
let kinds: usize = domtree::tokenize("<b>hi</b>").count();
assert_eq!(kinds, 3); // <b>, "hi", </b>