Reorderex v0.1.1 Reorderex View Source

An elixir helper library for database list reordering functionality.

Link to this section Summary

Functions

Returns a string that is greater than the first argument and smaller than the second argument.

Behaves the same as between/2 except that it will raise when the two strings are equals.

Returns current EPOCH in base 62.

Link to this section Functions

Link to this function

between(a, b)

View Source
between(binary() | nil, binary() | nil) :: binary() | nil

Returns a string that is greater than the first argument and smaller than the second argument.

Examples

iex> Reorderex.between("a", "c")
"b"

iex> Reorderex.between("a", "b")
"aV"

iex> Reorderex.between("a", "a")
"a"

iex> Reorderex.between(nil, "a")
"I"

iex> Reorderex.between("0", nil)
"3"

iex> Reorderex.between(nil, nil)
nil
Link to this function

between!(a, b)

View Source
between!(binary() | nil, binary() | nil) :: binary() | nil | no_return()

Behaves the same as between/2 except that it will raise when the two strings are equals.

Examples

iex> Reorderex.between!("a", "c")
"b"

iex> Reorderex.between!("a", "a0")
** (ArgumentError) Given strings are equals

Returns current EPOCH in base 62.