21 lines
430 B
C#
21 lines
430 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace BITKit
|
|
{
|
|
public class StringHelper
|
|
{
|
|
public static byte[] GetBytes(string str )
|
|
{
|
|
return Encoding.UTF8.GetBytes( str );
|
|
}
|
|
public static string GetString(byte[] buffer)
|
|
{
|
|
return Encoding.UTF8.GetString(buffer);
|
|
}
|
|
}
|
|
}
|