mirror of
https://github.com/nushell/nushell.git
synced 2025-08-14 01:08:51 +02:00
Add starts with operator (#5061)
* add starts_with operator * added a test
This commit is contained in:
@ -34,6 +34,7 @@ impl Expression {
|
||||
Operator::Plus | Operator::Minus => 90,
|
||||
Operator::NotContains
|
||||
| Operator::Contains
|
||||
| Operator::StartsWith
|
||||
| Operator::LessThan
|
||||
| Operator::LessThanOrEqual
|
||||
| Operator::GreaterThan
|
||||
|
@ -23,6 +23,7 @@ pub enum Operator {
|
||||
And,
|
||||
Or,
|
||||
Pow,
|
||||
StartsWith,
|
||||
}
|
||||
|
||||
impl Display for Operator {
|
||||
@ -46,6 +47,7 @@ impl Display for Operator {
|
||||
Operator::Pow => write!(f, "**"),
|
||||
Operator::LessThanOrEqual => write!(f, "<="),
|
||||
Operator::GreaterThanOrEqual => write!(f, ">="),
|
||||
Operator::StartsWith => write!(f, "=^"),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user