delete spaces properly

This commit is contained in:
Bobby Lucero 2025-07-12 02:28:05 -04:00
parent 5de6c6a212
commit 7c4273c4e2

View File

@ -120,8 +120,15 @@ class Program
evaluated = false;
}
else if (expression.Length > 0)
{
if (expression.EndsWith(" "))
{
expression = expression[..^3];
}
else
{
expression = expression[..^1];
}
if (currentInput.Length > 0)
currentInput = currentInput[..^1];
if (expression.Length == 0)