NumEx v0.1.0 StringManipulations View Source

A module to perform operations on Strings.

Link to this section Summary

Functions

Takes two strings and concatenates them element-wise

Return a copy of s1 with its elements centered in a string of length width

Return a string which is the concatenation of the strings in the sequence seq

Return (a * i), that is string multiple concatenation, element-wise

Link to this section Functions

Takes two strings and concatenates them element-wise.

Examples

iex> StringManipulations.add("Elixir", "Lang")
["EL", "la", "in", "xg"]
Link to this function center(s1, n) View Source
center(String.t(), integer()) :: String.t()

Return a copy of s1 with its elements centered in a string of length width..

Examples

iex> StringManipulations.center("Elixir", 5)
"Elixi"

Return a string which is the concatenation of the strings in the sequence seq.

Examples

iex> StringManipulations.join("Elixir", "Lang")
"LElixiraElixirnElixirg"
Link to this function multiply(s1, n) View Source
multiply(String.t(), integer()) :: list()

Return (a * i), that is string multiple concatenation, element-wise.

Examples

iex> StringManipulations.multiply("Elixir", 3)
["EEE", "lll", "iii", "xxx", "iii", "rrr"]