Implemented the DoesNotExist condition.

This commit is contained in:
ruri
2019-04-20 12:04:10 +02:00
parent 78483a1a84
commit f3552a58a1
3 changed files with 10 additions and 4 deletions
+7 -1
View File
@@ -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;
}