io
get_next_line

get_next_line

Mojo function 🡭

get_next_line

 
fn get_next_line[is_mutable: Bool, //, origin: Origin[is_mutable]](buffer: Span[SIMD[uint8, 1], origin], start: Int) -> Span[SIMD[uint8, 1], origin]

Function to get the next line using either SIMD instruction (default) or iteratively. Parameters:

  • is_mutable (Bool)
  • origin (Origin)

Args:

  • buffer (Span): The buffer to search for the next newline character.
  • start (Int): The start position to use inside the buffer.

Returns:

Span: A span of bytes from [start, newline).