MCPcopy Create free account
hub / github.com/ccusage/ccusage / strip_program_name

Function strip_program_name

rust/crates/ccusage-cli/src/help.rs:36–42  ·  view source on GitHub ↗
(args: &[String])

Source from the content-addressed store, hash-verified

34}
35
36fn strip_program_name(args: &[String]) -> &[String] {
37 if args.first().is_some_and(|arg| is_program_name(arg)) {
38 &args[1..]
39 } else {
40 args
41 }
42}
43
44fn is_program_name(arg: &str) -> bool {
45 let name = Path::new(arg)

Callers 1

help_text_for_argsFunction · 0.85

Calls 1

is_program_nameFunction · 0.85

Tested by

no test coverage detected