pub fn take(val: &str, args: Vec<&str>) -> Result<String, TransformerError>
Expand description

Split the text with given separator and then take the Nth group

N=0, will give the whole group separated by comma, but it might give unexpected results if there is already comma in string and you’re splitting with something else

    assert_eq!(take("nata", vec!["a", "2"])?, "t");
    assert_eq!(take("hi there fellow", vec![" ", "2"])?, "there");
    assert_eq!(take("hi there fellow", vec![" ", "2", "2"])?, "there fellow");