pub fn split(value: Value, args: HashMap<String, Value>) -> Result<Value> {
    let s = try_get_value!("split", "value", String, value);

    let pat = match args.get("pat") {
        Some(pat) => try_get_value!("split", "pat", String, pat),
        None => bail!("Filter `split` expected an arg called `pat`"),
    };

    Ok(to_value(s.split(&pat).collect::<Vec<_>>()).unwrap())
}
/// Split the given string by the given pattern.
Split the given string by the given pattern.
Split the given string by the given pattern .
pub fn split(value: Value, args: HashMap<String, Value>) -> Result<Value> {
    let s = try_get_value!("split", "value", String, value);
    let pat = match args.get("pat") {
        Some(pat) => try_get_value!("split", "pat", String, pat),
        None => bail!("Filter `split` expected an arg called `pat`"),
    };
    Ok(to_value(s.split(&pat).collect::<Vec<_>>()).unwrap())
}
pub fn split ( value : Value , args : HashMap < String , Value > ) -> Result < Value > { let s = try_get_value ! ( " " " " String value ) ; let pat = match args . get ( " " ) { Some ( pat ) => try_get_value ! ( " " " " String pat ) , None => bail ! ( " " ) , } ; Ok ( to_value ( s . split ( & pat ) . collect :: < Vec < _ > > ( ) ) . unwrap ( ) ) }
Split the given string by the given pattern.
Split the given string by the given pattern .
value
Value
args
HashMap<String, Value>
value
Value
args
HashMap<String, Value>