forked from extern/nushell
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:
@ -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) => {
|
||||
|
Reference in New Issue
Block a user