Skip to main content

split_string_respect_comma

Function split_string_respect_comma 

Source
pub fn split_string_respect_comma<'a>(input: &'a str) -> Vec<&'a str>
Expand description

Splits a string by commas, but respects parentheses/braces

E.g. url(something,else), url(another,thing) becomes ["url(something,else)", "url(another,thing)"] whereas a normal split by comma would yield ["url(something", "else)", "url(another", "thing)"]