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

Function is_program_name

rust/crates/ccusage-cli/src/help.rs:44–53  ·  view source on GitHub ↗
(arg: &str)

Source from the content-addressed store, hash-verified

42}
43
44fn is_program_name(arg: &str) -> bool {
45 let name = Path::new(arg)
46 .file_name()
47 .and_then(|name| name.to_str())
48 .unwrap_or(arg)
49 .rsplit('\\')
50 .next()
51 .unwrap_or(arg);
52 matches!(name, "ccusage" | "ccusage.exe")
53}
54
55fn help_text_for_tokens(tokens: &[String]) -> String {
56 find_help_page(tokens).map_or_else(root_help_text, render_help_page)

Callers 1

strip_program_nameFunction · 0.85

Calls 1

nextMethod · 0.45

Tested by

no test coverage detected