Add ends-with operator and fix dataframe operator behavior (#5395)

* add ends-with operator

* escape needles in dataframe operator regex patterns
This commit is contained in:
panicbit
2022-05-02 10:02:38 +02:00
committed by GitHub
parent 07a7bb14bf
commit 49cbc30974
8 changed files with 68 additions and 2 deletions

View File

@ -427,6 +427,10 @@ pub fn eval_expression(
let rhs = eval_expression(engine_state, stack, rhs)?;
lhs.starts_with(op_span, &rhs, expr.span)
}
Operator::EndsWith => {
let rhs = eval_expression(engine_state, stack, rhs)?;
lhs.ends_with(op_span, &rhs, expr.span)
}
}
}
Expr::Subexpression(block_id) => {