parse_available

Function parse_available 

Source
pub fn parse_available(stderr: &str, item: &str) -> Vec<String>
Expand description

Parses the stderr output to extract available items (e.g. binaries or examples) by looking for a marker of the form “Available {item}:”.

§Example

use cargo_e::e_parser::parse_available;

let stderr = "Available examples:\n  example1\n  example2\n";
let result = parse_available(stderr, "examples");
assert_eq!(result, vec!["example1", "example2"]);