mirror of
https://github.com/nsnail/ns-ext.git
synced 2025-04-18 23:22:51 +08:00
1.0.6
This commit is contained in:
parent
a0aca21adb
commit
97acd3ea56
@ -42,11 +42,11 @@ public static class ByteExtensions
|
||||
/// <param name="upperCase">是否大写</param>
|
||||
/// <param name="splitShar">字节间分隔符</param>
|
||||
/// <returns></returns>
|
||||
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;
|
||||
}
|
||||
}
|
@ -3,7 +3,7 @@
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Version>1.0.5</Version>
|
||||
<Version>1.0.6</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
Loading…
x
Reference in New Issue
Block a user