From 97acd3ea5648ab72bdb9ee5c22fbb9d729a2d126 Mon Sep 17 00:00:00 2001 From: nsnail Date: Wed, 30 Nov 2022 11:51:38 +0800 Subject: [PATCH] 1.0.6 --- src/NSExt/Extensions/ByteExtensions.cs | 8 ++++---- src/NSExt/NSExt.csproj | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/NSExt/Extensions/ByteExtensions.cs b/src/NSExt/Extensions/ByteExtensions.cs index 0e6d4cf..b443098 100644 --- a/src/NSExt/Extensions/ByteExtensions.cs +++ b/src/NSExt/Extensions/ByteExtensions.cs @@ -42,11 +42,11 @@ public static class ByteExtensions /// 是否大写 /// 字节间分隔符 /// - public static string String(this byte[] me, bool upperCase = true, char? splitShar = '-') + public static string String(this byte[] me, bool upperCase = true, string splitShar = null) { - var ret = BitConverter.ToString(me); - if (!upperCase) ret = ret.ToLower(); - if (splitShar is not null && splitShar != '-') ret = ret.Replace('-', splitShar.Value); + var ret = BitConverter.ToString(me); + if (!upperCase) ret = ret.ToLower(); + if (splitShar != "-") ret = ret.Replace("-", splitShar ?? string.Empty); return ret; } } \ No newline at end of file diff --git a/src/NSExt/NSExt.csproj b/src/NSExt/NSExt.csproj index f800d1f..117fe67 100644 --- a/src/NSExt/NSExt.csproj +++ b/src/NSExt/NSExt.csproj @@ -3,7 +3,7 @@ net6.0;net7.0 enable - 1.0.5 + 1.0.6