Files
dotNetStudyWithGPT/MySolution/STcpHelper/Utility/SEncoding.cs

22 lines
471 B
C#
Raw Normal View History

2023-10-11 11:51:44 +09:00
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
2023-10-13 14:15:26 +09:00
namespace STcpHelper.Utility
2023-10-11 11:51:44 +09:00
{
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);
}
}
}