MCPcopy
hub / github.com/bitfield/script / ExamplePipe_Dirname

Function ExamplePipe_Dirname

script_windows_test.go:74–93  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

72}
73
74func ExamplePipe_Dirname() {
75 input := []string{
76 "",
77 "/",
78 "/root",
79 "/tmp/example.php",
80 "/var/tmp/",
81 "./src/filters",
82 "C:/Program Files",
83 }
84 script.Slice(input).Dirname().Stdout()
85 // Output:
86 // .
87 // \
88 // \
89 // \tmp
90 // \var
91 // ./src
92 // C:\
93}

Callers

nothing calls this directly

Calls 3

SliceFunction · 0.92
StdoutMethod · 0.80
DirnameMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…