fn len_and_ws_len_utf8(s: &str, total_len_16: u32, ws_len_16: u32) -> (usize, usize) {
    let non_ws_len_16 = (total_len_16 - ws_len_16) as usize;
    let non_ws_len_8 = util::count_until_utf16(s, non_ws_len_16).unwrap_or_else(|| s.len());
    let s = &s[non_ws_len_8..];
    let ws_len_8 = util::count_until_utf16(s, ws_len_16 as usize).unwrap_or_else(|| s.len());
    (non_ws_len_8, ws_len_8)
}
// handles the weirdness where we're dealing with lengths but count_until_utf16 deals
// with offsets
handles the weirdness where we're dealing with lengths but count_until_utf16 deals
with offsets
handles the weirdness where we ' re dealing with lengths but count_until_utf16 deals with offsets
fn len_and_ws_len_utf8(s: &str, total_len_16: u32, ws_len_16: u32) -> (usize, usize) {
    let non_ws_len_16 = (total_len_16 - ws_len_16) as usize;
    let non_ws_len_8 = util::count_until_utf16(s, non_ws_len_16).unwrap_or_else(|| s.len());
    let s = &s[non_ws_len_8..];
    let ws_len_8 = util::count_until_utf16(s, ws_len_16 as usize).unwrap_or_else(|| s.len());
    (non_ws_len_8, ws_len_8)
}
fn len_and_ws_len_utf8 ( s : & str , total_len_16 : u32 , ws_len_16 : u32 ) -> ( usize , usize ) { let non_ws_len_16 = ( total_len_16 - ws_len_16 ) as usize ; let non_ws_len_8 = util :: count_until_utf16 ( s , non_ws_len_16 ) . unwrap_or_else ( | | s . len ( ) ) ; let s = & s [ non_ws_len_8 .. ] ; let ws_len_8 = util :: count_until_utf16 ( s , ws_len_16 as usize ) . unwrap_or_else ( | | s . len ( ) ) ; ( non_ws_len_8 , ws_len_8 ) }
handles the weirdness where we're dealing with lengths but count_until_utf16 deals
with offsets
handles the weirdness where we ' re dealing with lengths but count_until_utf16 deals with offsets
s
&str
total_len_16
u32
ws_len_16
u32