MCPcopy Index your code
hub / github.com/NativeScript/SimDeck / command_arg_after

Function command_arg_after

packages/server/src/main.rs:1767–1773  ·  view source on GitHub ↗
(command: &str, flag: &str)

Source from the content-addressed store, hash-verified

1765}
1766
1767fn command_arg_after(command: &str, flag: &str) -> Option<String> {
1768 let marker = format!(" {flag} ");
1769 let start = command.find(&marker)? + marker.len();
1770 let value = &command[start..];
1771 let end = value.find(" --").unwrap_or(value.len());
1772 Some(value[..end].trim().to_owned()).filter(|value| !value.is_empty())
1773}
1774
1775fn terminate_process_group(pid: u32, timeout: Duration) {
1776 terminate_process_group_with_kill_timeout(pid, timeout, Duration::from_secs(2));

Calls 1

is_emptyMethod · 0.80

Tested by

no test coverage detected