using System.Text;
using UnityEngine;
public class Test : MonoBehaviour
{
public byte[] GetBytes(string parseString)
{
return Encoding.UTF8.GetBytes(parseString);
}
public string ParseToString(byte[] utf8Bytes)
{
return Encoding.UTF8.GetString(utf8Bytes);
}
}
C# String与byte[]转换
于 2020-03-27 15:40:18 首次发布