Skip to main content

parse_hunk_header

Function parse_hunk_header 

Source
fn parse_hunk_header(line: &str) -> Option<(u32, u32, u32, u32)>
Expand description

Parse @@ -OLD_START[,OLD_COUNT] +NEW_START[,NEW_COUNT] @@. Missing counts default to 1 per the unified-diff spec. Returns None on malformed headers (caller skips the hunk).