Supercell.GUT/Supercell.GUT.Titan/Logic/Util/LogicStringUtil.cs
BreadDEV 8c6a533918 [v0.0.2] you can enter menu now. but still early state
todo: improve code and finish base structures
2024-03-05 17:37:18 +07:00

30 lines
594 B
C#

using System.Text;
namespace Supercell.GUT.Titan.Logic.Util;
public static class LogicStringUtil
{
public static string SafeString(string a1, string? a2, string a3)
{
if (a2 != null)
{
a1 = a2;
}
else
{
a1 = a3;
}
return a1;
}
public static string CreateString(byte[] byteArray, int offset, int length)
{
return Encoding.UTF8.GetString(byteArray, offset, length);
}
public static byte[] GetBytes(string value)
{
return Encoding.UTF8.GetBytes(value);
}
}