mirror of
https://github.com/Stone-Red-Code/YesNt-Interpreter.git
synced 2026-09-09 23:43:16 +02:00
Rename SaveString to SafeString
This commit is contained in:
@@ -34,7 +34,7 @@ namespace YesNt.Interpreter.Statements
|
||||
RuntimeInfo.Exit("Terminated by external process", true);
|
||||
return;
|
||||
}
|
||||
args = args.ReplaceFirstOccurrence("%crl ", input.ToSaveString() + " ");
|
||||
args = args.ReplaceFirstOccurrence("%crl ", input.ToSafeString() + " ");
|
||||
}
|
||||
RuntimeInfo.CurrentLine = args.TrimEnd();
|
||||
}
|
||||
@@ -46,7 +46,7 @@ namespace YesNt.Interpreter.Statements
|
||||
while (args.Contains("%cr "))
|
||||
{
|
||||
string input = ConsoleExtentions.ReadKey(RuntimeInfo).ToString();
|
||||
args = args.ReplaceFirstOccurrence("%cr ", input.ToSaveString() + " ");
|
||||
args = args.ReplaceFirstOccurrence("%cr ", input.ToSafeString() + " ");
|
||||
}
|
||||
RuntimeInfo.CurrentLine = args.TrimEnd();
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ internal partial class ProcessingStatements : StatementRuntimeInformation
|
||||
[Statement("!calc", SearchMode.EndOfLine, SpaceAround.Start, ConsoleColor.DarkYellow, Priority = Priority.High)]
|
||||
public void Calculate(string args)
|
||||
{
|
||||
MatchCollection matches = CalculationRegex().Matches(args.FromSaveString());
|
||||
MatchCollection matches = CalculationRegex().Matches(args.FromSafeString());
|
||||
|
||||
for (int i = 0; i < matches.Count; i++)
|
||||
{
|
||||
@@ -26,7 +26,7 @@ internal partial class ProcessingStatements : StatementRuntimeInformation
|
||||
RuntimeInfo.Exit("Invalid operation", true);
|
||||
return;
|
||||
}
|
||||
args = args.FromSaveString().Replace(matches[i].Value, res);
|
||||
args = args.FromSafeString().Replace(matches[i].Value, res);
|
||||
}
|
||||
|
||||
RuntimeInfo.CurrentLine = args;
|
||||
@@ -35,7 +35,7 @@ internal partial class ProcessingStatements : StatementRuntimeInformation
|
||||
[Statement("!eval", SearchMode.EndOfLine, SpaceAround.Start, ConsoleColor.DarkYellow, Priority = Priority.VeryHigh)]
|
||||
public void Evaluate(string args)
|
||||
{
|
||||
RuntimeInfo.CurrentLine = args.FromSaveString();
|
||||
RuntimeInfo.CurrentLine = args.FromSafeString();
|
||||
}
|
||||
|
||||
[Statement("!!", SearchMode.Contains, SpaceAround.None, ConsoleColor.DarkYellow, Priority = Priority.PreProcessing, KeepStatementInArgs = true)]
|
||||
@@ -49,7 +49,7 @@ internal partial class ProcessingStatements : StatementRuntimeInformation
|
||||
{
|
||||
char charToEscape = args[index];
|
||||
args = args.Remove(index, 1);
|
||||
args = args.Insert(index, charToEscape.ToString().ToSaveString());
|
||||
args = args.Insert(index, charToEscape.ToString().ToSafeString());
|
||||
}
|
||||
}
|
||||
RuntimeInfo.CurrentLine = args;
|
||||
|
||||
@@ -16,7 +16,7 @@ namespace YesNt.Interpreter.Statements
|
||||
[Statement("exc", SearchMode.StartOfLine, SpaceAround.End, ConsoleColor.Magenta, Priority = Priority.Low, Seperator = "|")]
|
||||
public void ExecuteProgramWithArgs(string input)
|
||||
{
|
||||
string[] parts = input.FromSaveString().Split('|');
|
||||
string[] parts = input.FromSafeString().Split('|');
|
||||
parts[0] = parts[0].Trim();
|
||||
|
||||
string[] functionArgumets = parts[1].Split(',');
|
||||
|
||||
Reference in New Issue
Block a user