String.trim_leading

You're seeing just the function trim_leading, go back to String module for more information.

Specs

trim_leading(t()) :: t()

Returns a string where all leading Unicode whitespaces have been removed.

Examples

iex> String.trim_leading("\n  abc   ")
"abc   "
Link to this function

trim_leading(string, to_trim)

View Source

Specs

trim_leading(t(), t()) :: t()

Returns a string where all leading to_trim characters have been removed.

Examples

iex> String.trim_leading("__ abc _", "_")
" abc _"

iex> String.trim_leading("1 abc", "11")
"1 abc"