mirror of
https://github.com/openbullet/openbullet.git
synced 2023-10-21 07:33:42 -05:00
Implemented the DoesNotExist condition.
This commit is contained in:
@@ -28,7 +28,10 @@ namespace RuriLib
|
||||
DoesNotContain,
|
||||
|
||||
/// <summary>Whether any variable can be replaced inside the string.</summary>
|
||||
Exists
|
||||
Exists,
|
||||
|
||||
/// <summary>Whether no variable can be replaced inside the string.</summary>
|
||||
DoesNotExist
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -74,6 +77,9 @@ namespace RuriLib
|
||||
case Condition.Exists:
|
||||
return L.Any(l => l != left); // Returns true if any replacement took place
|
||||
|
||||
case Condition.DoesNotExist:
|
||||
return L.All(l => l == left); // Returns true if no replacement took place
|
||||
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user