Function openrr_planner::collision::parse_colon_separated_pairs
source · pub fn parse_colon_separated_pairs(
pair_strs: &[String],
) -> Result<Vec<(String, String)>>
Expand description
Parse args to get self collision pair
§Example
let pairs = openrr_planner::collision::parse_colon_separated_pairs(&vec!["ab:cd".to_owned(), "ab:ef".to_owned()]).unwrap();
assert_eq!(pairs.len(), 2);
assert_eq!(pairs[0].0, "ab");
assert_eq!(pairs[0].1, "cd");
assert_eq!(pairs[1].0, "ab");
assert_eq!(pairs[1].1, "ef");