mirror of
https://github.com/nsnail/dot.git
synced 2025-06-17 13:03:22 +08:00
..
This commit is contained in:
parent
c17d142635
commit
102d45fa63
@ -1 +1,2 @@
|
|||||||
git reset --hard | git clean -d -fx .
|
git reset --hard
|
||||||
|
git clean -d -fx .
|
@ -1,26 +0,0 @@
|
|||||||
namespace Dot.Text;
|
|
||||||
|
|
||||||
internal sealed partial class Main
|
|
||||||
{
|
|
||||||
private ref struct Output
|
|
||||||
{
|
|
||||||
public ReadOnlySpan<char> AndUnicode;
|
|
||||||
public ReadOnlySpan<char> BacksLantUnicode;
|
|
||||||
public ReadOnlySpan<char> Base64;
|
|
||||||
public ReadOnlySpan<char> Base64DeCode;
|
|
||||||
public ReadOnlySpan<char> Base64DeCodeHex;
|
|
||||||
public ReadOnlySpan<char> EncodingName;
|
|
||||||
public ReadOnlySpan<char> Hex;
|
|
||||||
public ReadOnlySpan<char> HtmlDecode;
|
|
||||||
public ReadOnlySpan<char> HtmlEncode;
|
|
||||||
public ReadOnlySpan<char> Md5;
|
|
||||||
public ReadOnlySpan<char> OriginText;
|
|
||||||
public ReadOnlySpan<char> PercentUnicode;
|
|
||||||
public ReadOnlySpan<char> Sha1;
|
|
||||||
public ReadOnlySpan<char> Sha256;
|
|
||||||
public ReadOnlySpan<char> Sha512;
|
|
||||||
public ReadOnlySpan<char> UnicodeDecode;
|
|
||||||
public ReadOnlySpan<char> UrlDecode;
|
|
||||||
public ReadOnlySpan<char> UrlEncode;
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,6 +1,5 @@
|
|||||||
// ReSharper disable ClassNeverInstantiated.Global
|
// ReSharper disable ClassNeverInstantiated.Global
|
||||||
|
|
||||||
using System.Globalization;
|
|
||||||
using System.Security.Cryptography;
|
using System.Security.Cryptography;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using NSExt.Extensions;
|
using NSExt.Extensions;
|
||||||
@ -13,7 +12,7 @@ namespace Dot.Text;
|
|||||||
|
|
||||||
[Description(nameof(Str.TextTool))]
|
[Description(nameof(Str.TextTool))]
|
||||||
[Localization(typeof(Str))]
|
[Localization(typeof(Str))]
|
||||||
internal sealed partial class Main : ToolBase<Option>
|
internal sealed class Main : ToolBase<Option>
|
||||||
{
|
{
|
||||||
#if NET7_0_WINDOWS
|
#if NET7_0_WINDOWS
|
||||||
protected override async Task Core()
|
protected override async Task Core()
|
||||||
@ -43,7 +42,6 @@ internal sealed partial class Main : ToolBase<Option>
|
|||||||
ret.Base64DeCodeHex = ReadOnlySpan<char>.Empty;
|
ret.Base64DeCodeHex = ReadOnlySpan<char>.Empty;
|
||||||
ret.Base64DeCode = ReadOnlySpan<char>.Empty;
|
ret.Base64DeCode = ReadOnlySpan<char>.Empty;
|
||||||
ret.EncodingName = enc.EncodingName;
|
ret.EncodingName = enc.EncodingName;
|
||||||
ret.OriginText = text;
|
|
||||||
ret.Hex = inputHex.String();
|
ret.Hex = inputHex.String();
|
||||||
ret.Base64 = text.Base64(enc);
|
ret.Base64 = text.Base64(enc);
|
||||||
ret.Md5 = MD5.HashData(inputHex).String();
|
ret.Md5 = MD5.HashData(inputHex).String();
|
||||||
@ -140,4 +138,25 @@ internal sealed partial class Main : ToolBase<Option>
|
|||||||
Process.Start("explorer", file);
|
Process.Start("explorer", file);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private ref struct Output
|
||||||
|
{
|
||||||
|
public ReadOnlySpan<char> AndUnicode;
|
||||||
|
public ReadOnlySpan<char> BacksLantUnicode;
|
||||||
|
public ReadOnlySpan<char> Base64;
|
||||||
|
public ReadOnlySpan<char> Base64DeCode;
|
||||||
|
public ReadOnlySpan<char> Base64DeCodeHex;
|
||||||
|
public ReadOnlySpan<char> EncodingName;
|
||||||
|
public ReadOnlySpan<char> Hex;
|
||||||
|
public ReadOnlySpan<char> HtmlDecode;
|
||||||
|
public ReadOnlySpan<char> HtmlEncode;
|
||||||
|
public ReadOnlySpan<char> Md5;
|
||||||
|
public ReadOnlySpan<char> PercentUnicode;
|
||||||
|
public ReadOnlySpan<char> Sha1;
|
||||||
|
public ReadOnlySpan<char> Sha256;
|
||||||
|
public ReadOnlySpan<char> Sha512;
|
||||||
|
public ReadOnlySpan<char> UnicodeDecode;
|
||||||
|
public ReadOnlySpan<char> UrlDecode;
|
||||||
|
public ReadOnlySpan<char> UrlEncode;
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user