dh_invoke_replace_argument

Function dh_invoke_replace_argument 

Source
pub fn dh_invoke_replace_argument(line: &str, old: &str, new: &str) -> String
Expand description

Replace one argument with another in a dh invocation.

§Arguments

  • line - The command line to modify
  • old - The argument to replace
  • new - The new argument value

§Returns

The modified line with the argument replaced

§Examples

use debian_analyzer::rules::dh_invoke_replace_argument;
assert_eq!(
    dh_invoke_replace_argument("dh $@ --foo", "--foo", "--bar"),
    "dh $@ --bar"
);