MCPcopy Create free account
hub / github.com/PowerShell/DSC / split_csv

Function split_csv

resources/windows_firewall/src/firewall.rs:216–224  ·  view source on GitHub ↗
(value: Option<String>)

Source from the content-addressed store, hash-verified

214}
215
216fn split_csv(value: Option<String>) -> Option<Vec<String>> {
217 value.map(|raw| {
218 raw.split(',')
219 .map(str::trim)
220 .filter(|entry| !entry.is_empty())
221 .map(ToOwned::to_owned)
222 .collect::<Vec<String>>()
223 }).filter(|items| !items.is_empty())
224}
225
226fn join_csv(value: &[String]) -> String {
227 value.join(",")

Callers 1

rule_to_modelFunction · 0.85

Calls 1

is_emptyMethod · 0.45

Tested by

no test coverage detected