update
This commit is contained in:
21
MySolution/STcpHelper/Utility/SEncoding.cs
Normal file
21
MySolution/STcpHelper/Utility/SEncoding.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace STcpHelper.Utility
|
||||
{
|
||||
internal class SEncoding
|
||||
{
|
||||
public static string GetString(byte[] bytes, int index, int length)
|
||||
{
|
||||
return Encoding.UTF8.GetString(bytes, index, length);
|
||||
}
|
||||
|
||||
public static byte[] GetBytes(string s)
|
||||
{
|
||||
return Encoding.UTF8.GetBytes(s);
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user