17 lines
333 B
C#
17 lines
333 B
C#
|
using System.Text;
|
|||
|
|
|||
|
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);
|
|||
|
}
|
|||
|
}
|
|||
|
}
|