Add a simple protocol helper
This commit is contained in:
8
src/geef_pkt.erl
Normal file
8
src/geef_pkt.erl
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
-module(geef_pkt).
|
||||||
|
|
||||||
|
-export([line/1]).
|
||||||
|
|
||||||
|
-spec line(iolist()) -> iolist().
|
||||||
|
line(Text) ->
|
||||||
|
Prefix = io_lib:format("~4.16.0b", [iolist_size(Text) + 1]),
|
||||||
|
[Prefix, Text, "\n"].
|
||||||
Reference in New Issue
Block a user