1
0
mirror of https://github.com/deavmi/birchwood synced 2024-09-20 13:22:52 +02:00
- Removed implicit `static`
- Added documentation to `ubyte[] encodeMessage(string)`
This commit is contained in:
Tristan B. Velloza Kildaire 2023-03-14 23:57:40 +02:00
parent f4a2a75094
commit 1f1796930d

View File

@ -30,7 +30,16 @@ __gshared static this()
/** /**
* Encoding/decoding primitives * Encoding/decoding primitives
*/ */
public static ubyte[] encodeMessage(string messageIn)
/**
* Encodes the provided message into a CRLF
* terminated byte array
*
* Params:
* messageIn = the message to encode
* Returns: the encoded message
*/
public ubyte[] encodeMessage(string messageIn)
{ {
ubyte[] messageOut = cast(ubyte[])messageIn; ubyte[] messageOut = cast(ubyte[])messageIn;
messageOut~=[cast(ubyte)13, cast(ubyte)10]; messageOut~=[cast(ubyte)13, cast(ubyte)10];