feat: add new context menu items

This commit is contained in:
Anna
2022-01-06 15:33:35 -05:00
parent 8ce62fa24e
commit a6bda4dd63
5 changed files with 202 additions and 21 deletions
+13
View File
@@ -0,0 +1,13 @@
using System.Text;
namespace ChatTwo.Util;
internal static class StringUtil {
internal static byte[] ToTerminatedBytes(this string s) {
var unterminated = Encoding.UTF8.GetBytes(s);
var bytes = new byte[unterminated.Length + 1];
Array.Copy(unterminated, bytes, unterminated.Length);
bytes[^1] = 0;
return bytes;
}
}