elephant v0.1.0 Elephant.Message View Source
Link to this section Summary
Functions
Splits a string into two at the first zero-byte
Removes CR / CRLF at the beginning of the string
Link to this section Functions
Splits a string into two at the first zero-byte.
Examples
iex> Elephant.Message.read_until_zero(<<65, 66, 0, 67, 68>>)
{"AB", "CD"}
iex> Elephant.Message.read_until_zero(<<65, 66, 0>>)
{"AB", ""}
iex> Elephant.Message.read_until_zero(<<0, 67, 68>>)
{"", "CD"}
iex> Elephant.Message.read_until_zero(<<65, 66>>)
{"AB", ""}