forked from extern/nushell
Add =~
and !~
operators on strings
`left =~ right` return true if left contains right, using Rust's `String::contains`. `!~` is the negated version. A new `apply_operator` function is added which decouples evaluation from `Value::compare`. This returns a `Value` and opens the door to implementing `+` for example, though it wouldn't be useful immediately. The `operator!` macro had to be changed slightly as it would choke on `~` in arguments.
This commit is contained in:
committed by
Yehuda Katz
parent
e4226def16
commit
8f9dd6516e
@@ -1,5 +1,4 @@
|
||||
pub mod commands;
|
||||
pub mod debug;
|
||||
pub mod hir;
|
||||
pub mod parse;
|
||||
pub mod parse_command;
|
||||
|
Reference in New Issue
Block a user