Module binary

Binaries library.

Copyright © 2004 Enrique Marcote Peña

Version: 1.0, {18 Feb 2004} 12:29:46.

Authors: Enrique Marcote Peña (mpquique@users.sourceforge.net) [web site: http://www.des.udc.es/~mpquique/].

Description

Binaries library.

My own binary-manipulation functions.

Function Index

take_until/3Gets the leading octets of a Binary until Pattern is found or Size octets are inspected.

Function Details

take_until/3

take_until(Binary::Binary, Pattern::Pattern, Size::Size) -> Result

Gets the leading octets of a Binary until Pattern is found or Size octets are inspected.

If found before Size bytes are consumed, a binary with the leading octets UntilPattern is returned along the remainder of the binary.

Pattern is not included in the response, nor removed from Binary.

If Pattern is not found within the first Size octets of Binary, an error is reported, Pattern and the first Size bytes are returned as additional information.

See also: take_until/4.