From 32d3b66185acc329a643dadec7028fd75577cb01 Mon Sep 17 00:00:00 2001
From: Oleksii Holub <1935960+Tyrrrz@users.noreply.github.com>
Date: Sun, 11 Dec 2022 01:26:40 +0200
Subject: [PATCH] Use PolySharp
---
CliFx/CliFx.csproj | 2 +-
CliFx/Input/CommandInput.cs | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/CliFx/CliFx.csproj b/CliFx/CliFx.csproj
index b77c5a3..f244ebb 100644
--- a/CliFx/CliFx.csproj
+++ b/CliFx/CliFx.csproj
@@ -27,7 +27,7 @@
-
+
diff --git a/CliFx/Input/CommandInput.cs b/CliFx/Input/CommandInput.cs
index ed52f6e..9820b69 100644
--- a/CliFx/Input/CommandInput.cs
+++ b/CliFx/Input/CommandInput.cs
@@ -153,7 +153,7 @@ internal partial class CommandInput
if (!string.IsNullOrWhiteSpace(lastOptionIdentifier))
result.Add(new OptionInput(lastOptionIdentifier, lastOptionValues));
- lastOptionIdentifier = argument.Substring(2);
+ lastOptionIdentifier = argument[2..];
lastOptionValues = new List();
}
// Short name
@@ -161,7 +161,7 @@ internal partial class CommandInput
argument.Length > 1 &&
char.IsLetter(argument[1]))
{
- foreach (var alias in argument.Substring(1))
+ foreach (var alias in argument[1..])
{
// Flush previous
if (!string.IsNullOrWhiteSpace(lastOptionIdentifier))