Skip to main content

read_advance_string_in

Function read_advance_string_in 

Source
pub fn read_advance_string_in<'a>(
    bump: &'a Bump,
    window: &mut &'a [u8],
) -> Result<&'a str>
Expand description

Parse a string from the buffer, moving the buffer pointer forward.

Borrows the source buffer ('a) where possible: a valid-UTF-8 string is returned as a zero-copy slice of the buffer. Only the transcoded cases (UTF-16 wide, or lossy replacement of invalid bytes) allocate into the arena.