View Source FatUtils.Integer (FatEcto v1.0.0)

Provides utility functions for parsing integers from strings.

This module handles parsing of integers from strings and ensures consistent return types.

Summary

Functions

Parses an integer from a string or returns the integer if already an integer.

Parses an integer from a string or returns the integer if already an integer.

Functions

parse(int_str)

@spec parse(any()) :: {:ok, integer()} | {:error, nil}

Parses an integer from a string or returns the integer if already an integer.

Returns {:ok, integer} on success or {:error, nil} on failure.

parse!(int_str)

@spec parse!(any()) :: integer() | nil

Parses an integer from a string or returns the integer if already an integer.

Returns the parsed integer on success or nil on failure.