containers v0.1.0 Containers.Text

This container wraps a string value. This is useful for when you want to append strings together with not wanting to worry about nil throwing runtime errors.

Implemented Protocols

  1. Appenedable
  2. Mappable
  3. Unwrappable
  4. Emptyable
  5. Sequenceable

Summary

Functions

takes a normal string and puts in a Text Container

Types

t()
t() :: %Containers.Text{value: String.t}

Functions

from_string(str)
from_string(String.t) :: t

takes a normal string and puts in a Text Container.

Examples

iex> Containers.Text.from_string("hello world")
%Containers.Text{value: "hello world"}