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

Function argument_value

packages/server/src/service.rs:438–446  ·  view source on GitHub ↗
(arguments: &[String], name: &str)

Source from the content-addressed store, hash-verified

436}
437
438fn argument_value(arguments: &[String], name: &str) -> Option<String> {
439 arguments
440 .windows(2)
441 .find(|window| window.first().is_some_and(|value| value == name))
442 .and_then(|window| window.get(1))
443 .map(|value| value.trim())
444 .filter(|value| !value.is_empty())
445 .map(ToOwned::to_owned)
446}
447
448fn optional_argument_matches(arguments: &[String], name: &str, expected: Option<&str>) -> bool {
449 argument_value(arguments, name).as_deref() == expected

Callers 5

activeFunction · 0.85
installed_credentialsFunction · 0.85
installed_argument_valueFunction · 0.85

Calls 3

windowsMethod · 0.80
is_emptyMethod · 0.80
getMethod · 0.65

Tested by

no test coverage detected