View Source Boxen.Helpers (boxen v0.1.0)
Helpers for manipulating text
Link to this section Summary
Functions
Aligns a text
Gets the terminal columns
Helper method to print the directly print the result
Removes emojis from text and replace it with 2 blank spaces
Stripes ANSI characters from text
Gets the length of widest line in a text
Link to this section Functions
Aligns a text
@spec get_terminal_columns() :: pos_integer()
Gets the terminal columns
@spec print_output(result :: {:ok, String.t()} | {:error, String.t()}) :: :ok | {:error, String.t()}
Helper method to print the directly print the result
Removes emojis from text and replace it with 2 blank spaces
Stripes ANSI characters from text
@spec text_representation_length(text :: String.t()) :: non_neg_integer()
@spec widest_line(text :: String.t()) :: non_neg_integer()
Gets the length of widest line in a text