mirror of
https://github.com/gwdevhub/Daybreak.git
synced 2026-07-22 18:49:44 +00:00
721ee8e494
* Move shared code to Shared project * Move from Realm to Squealify * Rename Daybreak.Shared namespaces * Setup API project to expose a test API
17 lines
320 B
C#
17 lines
320 B
C#
using System.Text;
|
|
|
|
namespace Daybreak.Shared.Utils;
|
|
|
|
public static class SerializationExtensions
|
|
{
|
|
public static byte[] AsBytes(this string s)
|
|
{
|
|
return Encoding.UTF8.GetBytes(s);
|
|
}
|
|
|
|
public static string AsString(this byte[] bytes)
|
|
{
|
|
return Encoding.UTF8.GetString(bytes);
|
|
}
|
|
}
|