Skip to main content

join_string_component

Function join_string_component 

Source
pub fn join_string_component(components: Vec<String>) -> String
Expand description

join string component in a more human readable way e.g.

use rspack_core::join_string_component;
assert_eq!(
  "a, b and c",
  join_string_component(vec!["a".to_string(), "b".to_string(), "c".to_string()])
);
assert_eq!(
  "a and b",
  join_string_component(vec!["a".to_string(), "b".to_string(),])
);