pub(crate) fn try_consume_char_case_insensitive(s: &mut &str, expected: char) -> ParseResult<()> {
    match s.char_indices().next() {
        Some((index, actual_char)) if actual_char.eq_ignore_ascii_case(&expected) => {
            *s = &s[(index + actual_char.len_utf8())..];
            Ok(())
        }
        Some((_, actual)) => Err(Error::UnexpectedCharacter { expected, actual }),
        None => Err(Error::UnexpectedEndOfString),
    }
}
/// Attempt to consume the provided character, ignoring case.
Attempt to consume the provided character, ignoring case.
Attempt to consume the provided character ignoring case .
pub(crate) fn try_consume_char_case_insensitive(s: &mut &str, expected: char) -> ParseResult<()> {
    match s.char_indices().next() {
        Some((index, actual_char)) if actual_char.eq_ignore_ascii_case(&expected) => {
            *s = &s[(index + actual_char.len_utf8())..];
            Ok(())
        }
        Some((_, actual)) => Err(Error::UnexpectedCharacter { expected, actual }),
        None => Err(Error::UnexpectedEndOfString),
    }
}
pub ( crate ) fn try_consume_char_case_insensitive ( s : & mut & str , expected : char ) -> ParseResult < ( ) > { match s . char_indices ( ) . next ( ) { Some ( ( index , actual_char ) ) if actual_char . eq_ignore_ascii_case ( & expected ) => { * s = & s [ ( index + actual_char . len_utf8 ( ) ) .. ] ; Ok ( ( ) ) } Some ( ( _ , actual ) ) => Err ( Error :: UnexpectedCharacter { expected , actual } ) , None => Err ( Error :: UnexpectedEndOfString ) , } }
Attempt to consume the provided character, ignoring case.
Attempt to consume the provided character ignoring case .
s
&mut &str
expected
char
s
&mut &str
expected
char