barlix v0.3.3 Barlix.ITF

This module implements the Interleaved 2 of 5 (ITF) symbology.

Summary

Functions

Encodes the given value using ITF symbology. Only numeric characters are supported

Accepts the same arguments as encode/2. Returns Barlix.code/0 or raises Barlix.Error in case of invalid value

Functions

encode(value, options)
encode(String.t | charlist, Keyword.t) ::
  {:error, binary} |
  {:ok, Barlix.code}

Encodes the given value using ITF symbology. Only numeric characters are supported.

Options

  • :pad (boolean) - adds a prefix character 0 if the length of characters is not even. Defaults to false
  • :checksum (boolean) - enables checksum. Defaults to false
encode!(value, options \\ [])
encode!(String.t | charlist, Keyword.t) ::
  Barlix.code |
  no_return

Accepts the same arguments as encode/2. Returns Barlix.code/0 or raises Barlix.Error in case of invalid value.