unsafe fn bytes_consumed(cmap: &CMap, instr: &[u8]) -> usize {
    let inbytes = instr.len();
    let mut i = 0;
    let mut longest = 0_usize;
    let mut bytesconsumed;
    while i < cmap.codespace.len() {
        let csr = &cmap.codespace[i];
        let mut pos = 0;
        while pos < (if csr.dim < inbytes { csr.dim } else { inbytes }) {
            if instr[pos as usize] as i32 > *csr.codeHi.offset(pos as isize) as i32
                || (instr[pos as usize] as i32) < *csr.codeLo.offset(pos as isize) as i32
            {
                break;
            }
            pos = pos.wrapping_add(1)
        }
        if pos == csr.dim {
            /* part of instr is totally valid in this codespace. */
            return csr.dim;
        }
        if pos > longest {
            longest = pos
        }
        i += 1;
    }
    if i == cmap.codespace.len() {
        /* No matching at all */
        bytesconsumed = cmap.profile.minBytesIn
    } else {
        bytesconsumed = cmap.profile.maxBytesIn;
        for csr_0 in &cmap.codespace {
            if csr_0.dim > longest && csr_0.dim < bytesconsumed {
                bytesconsumed = csr_0.dim
            }
        }
    }
    bytesconsumed
}
/*
 * Guess how many bytes consumed as a `single' character:
 * Substring of length bytesconsumed bytes of input string is interpreted as
 * a `single' character by CMap_decode().
 */
Guess how many bytes consumed as a `single' character:
Substring of length bytesconsumed bytes of input string is interpreted as
a `single' character by CMap_decode().
Guess how many bytes consumed as a ` single ' character : Substring of length bytesconsumed bytes of input string is interpreted as a ` single ' character by CMap_decode () .
unsafe fn bytes_consumed(cmap: &CMap, instr: &[u8]) -> usize {
    let inbytes = instr.len();
    let mut i = 0;
    let mut longest = 0_usize;
    let mut bytesconsumed;
    while i < cmap.codespace.len() {
        let csr = &cmap.codespace[i];
        let mut pos = 0;
        while pos < (if csr.dim < inbytes { csr.dim } else { inbytes }) {
            if instr[pos as usize] as i32 > *csr.codeHi.offset(pos as isize) as i32
                || (instr[pos as usize] as i32) < *csr.codeLo.offset(pos as isize) as i32
            {
                break;
            }
            pos = pos.wrapping_add(1)
        }
        if pos == csr.dim {
            /* part of instr is totally valid in this codespace. */
            return csr.dim;
        }
        if pos > longest {
            longest = pos
        }
        i += 1;
    }
    if i == cmap.codespace.len() {
        /* No matching at all */
        bytesconsumed = cmap.profile.minBytesIn
    } else {
        bytesconsumed = cmap.profile.maxBytesIn;
        for csr_0 in &cmap.codespace {
            if csr_0.dim > longest && csr_0.dim < bytesconsumed {
                bytesconsumed = csr_0.dim
            }
        }
    }
    bytesconsumed
}
unsafe fn bytes_consumed ( cmap : & CMap , instr : & [ u8 ] ) -> usize { let inbytes = instr . len ( ) ; let mut i = 0 ; let mut longest = 0_usize ; let mut bytesconsumed ; while i < cmap . codespace . len ( ) { let csr = & cmap . codespace [ i ] ; let mut pos = 0 ; while pos < ( if csr . dim < inbytes { csr . dim } else { inbytes } ) { if instr [ pos as usize ] as i32 > * csr . codeHi . offset ( pos as isize ) as i32 || ( instr [ pos as usize ] as i32 ) < * csr . codeLo . offset ( pos as isize ) as i32 { break ; } pos = pos . wrapping_add ( 1 ) } if pos == csr . dim { /* part of instr is totally valid in this codespace. */ return csr . dim ; } if pos > longest { longest = pos } i += 1 ; } if i == cmap . codespace . len ( ) { /* No matching at all */ bytesconsumed = cmap . profile . minBytesIn } else { bytesconsumed = cmap . profile . maxBytesIn ; for csr_0 in & cmap . codespace { if csr_0 . dim > longest && csr_0 . dim < bytesconsumed { bytesconsumed = csr_0 . dim } } } bytesconsumed }
Guess how many bytes consumed as a `single' character:
 Substring of length bytesconsumed bytes of input string is interpreted as
 a `single' character by CMap_decode().
Guess how many bytes consumed as a ` single ' character : Substring of length bytesconsumed bytes of input string is interpreted as a ` single ' character by CMap_decode () .
cmap
&CMap
instr
&[u8]