fn char_to_utf8_multi_buffer_iterator() {
    let mybuffers = [[ '\u{7F}', '\u{80}' ] , [ '\u{81}', '\u{82}' ]];
    let mut parser = FromUnicode::new();
    for indx in 0 .. mybuffers.len() {
        parser.set_is_last_buffer(indx == mybuffers.len() - 1);
        let mut char_ref_iter = mybuffers[indx].iter();
        let mut iterator = parser.char_ref_to_utf8_with_iter(& mut char_ref_iter);
        while let Some(utf8_val) = iterator.next()  {
            println!("{:#02x}", utf8_val);
            println!("{}", iterator.has_invalid_sequence());
        }
    }
}
/// Multi-buffer iterator based char parsing converting to UTF8
Multi-buffer iterator based char parsing converting to UTF8
Multi - buffer iterator based char parsing converting to UTF8
fn char_to_utf8_multi_buffer_iterator() {
    let mybuffers = [[ '\u{7F}', '\u{80}' ] , [ '\u{81}', '\u{82}' ]];
    let mut parser = FromUnicode::new();
    for indx in 0 .. mybuffers.len() {
        parser.set_is_last_buffer(indx == mybuffers.len() - 1);
        let mut char_ref_iter = mybuffers[indx].iter();
        let mut iterator = parser.char_ref_to_utf8_with_iter(& mut char_ref_iter);
        while let Some(utf8_val) = iterator.next()  {
            println!("{:#02x}", utf8_val);
            println!("{}", iterator.has_invalid_sequence());
        }
    }
}
fn char_to_utf8_multi_buffer_iterator ( ) { let mybuffers = [ [ '\u{7F}' , '\u{80}' ] , [ '\u{81}' , '\u{82}' ] ] ; let mut parser = FromUnicode :: new ( ) ; for indx in 0 .. mybuffers . len ( ) { parser . set_is_last_buffer ( indx == mybuffers . len ( ) - 1 ) ; let mut char_ref_iter = mybuffers [ indx ] . iter ( ) ; let mut iterator = parser . char_ref_to_utf8_with_iter ( & mut char_ref_iter ) ; while let Some ( utf8_val ) = iterator . next ( ) { println ! ( " " utf8_val ) ; println ! ( " " iterator has_invalid_sequence ( ) ) ; } } }
Multi-buffer iterator based char parsing converting to UTF8
Multi - buffer iterator based char parsing converting to UTF8