pub fn replace_target_variables(input: String) -> String {
    let output = input.clone();
    if input.contains("${Target}") {
        if let Some(re) = Regex::new(r"\$\{Target\}.(?P<v>\w*)").ok() {
            let t = re.replace_all(output.as_bytes(), "target[\"$v\"]".as_bytes());
            if let Some(tt) = std::str::from_utf8(t.as_ref()).ok() {
                return tt.to_string();
            }
        }
    }
    output
}
/// Replace the target strings, only called once before compilation for each script
Replace the target strings, only called once before compilation for each script
Replace the target strings only called once before compilation for each script
pub fn replace_target_variables(input: String) -> String {
    let output = input.clone();
    if input.contains("${Target}") {
        if let Some(re) = Regex::new(r"\$\{Target\}.(?P<v>\w*)").ok() {
            let t = re.replace_all(output.as_bytes(), "target[\"$v\"]".as_bytes());
            if let Some(tt) = std::str::from_utf8(t.as_ref()).ok() {
                return tt.to_string();
            }
        }
    }
    output
}
pub fn replace_target_variables ( input : String ) -> String { let output = input . clone ( ) ; if input . contains ( " " ) { if let Some ( re ) = Regex :: new ( r"\$\{Target\}.(?P<v>\w*)" ) . ok ( ) { let t = re . replace_all ( output . as_bytes ( ) , " \" \" " . as_bytes ( ) ) ; if let Some ( tt ) = std :: str :: from_utf8 ( t . as_ref ( ) ) . ok ( ) { return tt . to_string ( ) ; } } } output }
Replace the target strings, only called once before compilation for each script
Replace the target strings only called once before compilation for each script
input
String
input
String