Skip to content

Commit 05dddf5

Browse files
Update EZHelp
1 parent 79f7d20 commit 05dddf5

1 file changed

Lines changed: 6 additions & 7 deletions

File tree

EZCode/EZHelp.cs

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ public object ObjectParse(object obj, object type, bool to_string, string arrayS
166166
obj = Interpreter.GetValue(n, data, arraySeperator);
167167
} while (obj != o);
168168
}
169-
catch when(returnNull) { return null; }
169+
catch when (returnNull) { return null; }
170170
if (!to_string)
171171
{
172172
if (int.TryParse(obj.ToString(), out int i)) return i;
@@ -273,8 +273,8 @@ public string StringExpression(string expression)
273273
{
274274
try
275275
{
276-
string m = mod.ToString(),
277-
a = ObjectParse(x.ToString(), "str", true).ToString(),
276+
string m = mod.ToString(),
277+
a = ObjectParse(x.ToString(), "str", true).ToString(),
278278
b = ObjectParse(y.ToString(), "str", true).ToString();
279279
switch (m)
280280
{
@@ -555,7 +555,7 @@ public bool IsType(object obj, object type)
555555
}
556556
}
557557
public object ArrayParse(object array, object separator) => ObjectParse(array, "list").ToString().Split(StringParse(separator)).Select(x => x.Trim()).ToArray();
558-
public string ArrayStringParse(object array) => ObjectParse(array, "list", to_string:false, arraySeperator:", ").ToString();
558+
public string ArrayStringParse(object array) => ObjectParse(array, "list", to_string: false, arraySeperator: ", ").ToString();
559559
public int ArrayLength(object array)
560560
{
561561
try
@@ -624,7 +624,7 @@ public float MathFunc(object obj, object op)
624624
}
625625
string operation = string.Join("", op.ToString().ToLower().ToCharArray().Select((x, y) => { if (y == 0) return char.Parse(x.ToString().ToUpper()); else return x; }));
626626
object[] parameters = [val1];
627-
if (!obj2_is_null) parameters = [..parameters, val2];
627+
if (!obj2_is_null) parameters = [.. parameters, val2];
628628

629629
return float.Parse(InvokeMethod($"System.MathF.{operation}", parameters, this, out _).ToString());
630630
}
@@ -920,7 +920,7 @@ public int DateTimeCompare(object _t1, object _t2)
920920
try
921921
{
922922

923-
DateTime
923+
DateTime
924924
t1 = DateTimeExtract(_t1),
925925
t2 = DateTimeExtract(_t2);
926926

@@ -1129,6 +1129,5 @@ public string DateTimeDayOfWeek(object _time)
11291129
DateTime dateTime = DateTimeExtract(_time);
11301130
return dateTime.DayOfWeek.ToString();
11311131
}
1132-
11331132
}
11341133
}

0 commit comments

Comments
 (0)