feature: Added message parser for better templating
This commit is contained in:
parent
5c27b5e5b6
commit
11243f1474
9 changed files with 247 additions and 13 deletions
12
Assets/Scripts/Messaging/MessageParser.cs
Normal file
12
Assets/Scripts/Messaging/MessageParser.cs
Normal file
|
@ -0,0 +1,12 @@
|
|||
using System.Collections.Generic;
|
||||
|
||||
namespace Messaging {
|
||||
public static class MessageParser {
|
||||
private const char MessageDifferentiator = '|';
|
||||
|
||||
public static KeyValuePair<string, string> SplitMessage(string message) {
|
||||
string[] result = message.Split(MessageDifferentiator);
|
||||
return new KeyValuePair<string, string>(result[0], result[1]);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue