NBloodServerSupervisor/Supervisor/StringUtils.cs
2020-01-23 21:03:54 +01:00

20 lines
479 B
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Supervisor
{
static class StringUtils
{
public static string[] SplitMessage(this string message)
{
return message.Substring(1)
.Split('\t', StringSplitOptions.RemoveEmptyEntries)
.Select(e => e.Trim('\0'))
.Where(e => !string.IsNullOrWhiteSpace(e))
.ToArray();
}
}
}