IsOdd (is_odd v0.0.2)

Documentation for IsOdd. Library for checking whether the number, string is odd or not.

Link to this section Summary

Functions

Function to check a number is odd or not.

Function to check a string (parsable into integer) is odd or not.

Link to this section Functions

Link to this function

is_odd?(number)

@spec is_odd?(integer()) :: boolean()

Function to check a number is odd or not.

error

Error

This syntax will render an error block

examples

Examples

iex> IsOdd.is_odd?(5)
true

iex> IsOdd.is_odd?(6)
false
Link to this function

is_odd?(num_string, base \\ 10)

@spec is_odd?(binary(), 2..36) :: boolean()

Function to check a string (parsable into integer) is odd or not.

examples

Examples

iex> IsOdd.is_odd?("5")
true

iex> IsOdd.is_odd?("6")
false

iex> IsOdd.is_odd?("3FF", 16)
true