Skip to main content

parse_dotted_version

Function parse_dotted_version 

Source
pub fn parse_dotted_version(raw: &str) -> Option<Version>
Expand description

Find the first N.N[.N…] token in raw and return its leading three numeric components (a missing patch reads as 0). Each component is the token’s leading digits, so 0-dev or 1.windows trailers don’t break parsing — this handles git version 2.54.0.windows.1, jj 0.42.0, 2.41.0-rc1, etc.