Skip to main content

pre_parse_flag_present

Function pre_parse_flag_present 

Source
fn pre_parse_flag_present(flag: &str) -> bool
Expand description

Returns whether flag is present among the binary’s leading top-level options.

The scan ends at the first -- separator, the first subcommand or positional token, or the first non-UTF-8 token (none of which can match the ASCII flags this helper supports). Values of known value-taking global options are skipped, so e.g. forge --color always --introspect and forge -j 4 --introspect still match.