Copyright © 2009-2020 Marc Worrell
Authors: Marc Worrell (marc@worrell.nl).
concat/2 | Concatenate two strings (list or binary). |
contains/2 | Return true if What is found in the string. |
ends_with/2 | Return true if Word ends with End. |
escape_ical/1 | Escape special characters for ical RFC2445 elements. |
first_char/1 | Return the first character of a string. |
is_string/1 | Check if the variable is a one dimensional list of bytes, or a valid utf-8 binary. |
is_whitespace/1 | Is the character an ASCII or Unicode whitespace character? See @link https://en.wikipedia.org/wiki/Whitespace_character. |
last_char/1 | Return the last character of a string. |
len/1 | |
line/1 | Make sure that the string is on one line only, replace control characters with spaces. |
normalize/1 | Transliterate an unicode string to an ascii string with lowercase characters. |
nospaces/1 | Remove all spaces and control characters from a string. |
replace/3 | Replace a string inside another string Copyright 2008 Rusty Klophaus (Nitrogen, MIT License). |
sanitize_utf8/1 | Sanitize an utf-8 string, remove all non-utf-8 characters. |
split/2 | Split a string, see http://www.erlang.org/pipermail/erlang-questions/2008-October/038896.html. |
split_lines/1 | Split the binary into lines. |
starts_with/2 | Return true if Start is a prefix of Word. |
to_lower/1 | Return a lowercase string for the input. |
to_name/1 | Map a string to a value that can be used as a name or slug. |
to_rootname/1 | Filter a filename so that we obtain a basename that is safe to use. |
to_slug/1 | Map a string to a slug that can be used in the uri of a page. |
to_upper/1 | Return a uppercase string for the input. |
trim/1 | Remove whitespace at the start and end of the string. |
trim/2 | Remove all occurences of a character at the start and end of a string. |
trim_left/1 | Remove whitespace at the start the string. |
trim_left/2 | Remove all occurences of a char at the start of a string. |
trim_left_func/2 | |
trim_right/1 | Remove whitespace at the end of the string. |
trim_right/2 | Remove all occurences of a char at the end of the string. |
truncate/2 | Truncate a string. |
truncate/3 | |
truncatechars/2 | Truncate a string, count all characters. |
truncatechars/3 | |
truncatewords/2 | Truncate a string, count all words. |
truncatewords/3 | |
unquote/1 | Remove the first and last char if they are double quotes. |
unquote/2 |
concat(A::string() | binary(), B::string() | binary()) -> string() | binary()
Concatenate two strings (list or binary). Return type matching the first part.
contains(What::iodata(), B::iodata()) -> boolean()
Return true if What is found in the string
ends_with(End::iodata(), B::iodata()) -> boolean()
Return true if Word ends with End
escape_ical(L) -> any()
Escape special characters for ical RFC2445 elements
first_char(X1::binary() | list()) -> non_neg_integer()
Return the first character of a string.
is_string(Rest::iodata()) -> boolean()
Check if the variable is a one dimensional list of bytes, or a valid utf-8 binary.
is_whitespace(C::non_neg_integer()) -> boolean()
Is the character an ASCII or Unicode whitespace character? See @link https://en.wikipedia.org/wiki/Whitespace_character
last_char(L::binary() | string()) -> non_neg_integer()
Return the last character of a string
len(L::binary() | string() | undefined) -> integer()
line(B::string() | binary()) -> string() | binary()
Make sure that the string is on one line only, replace control characters with spaces
normalize(Name::iodata() | atom() | {trans, list()}) -> binary()
Transliterate an unicode string to an ascii string with lowercase characters. Tries to transliterate some characters to a..z
nospaces(B::iodata()) -> iodata()
Remove all spaces and control characters from a string.
replace(String, S1, S2) -> any()
Replace a string inside another string Copyright 2008 Rusty Klophaus (Nitrogen, MIT License)
sanitize_utf8(L::string() | binary()) -> binary()
Sanitize an utf-8 string, remove all non-utf-8 characters.
split(String, L::String) -> list()
Split a string, see http://www.erlang.org/pipermail/erlang-questions/2008-October/038896.html
split_lines(B::binary()) -> [binary()]
Split the binary into lines. Line separators can be \r, \n or \r\n.
starts_with(Start::iodata(), B::iodata()) -> boolean()
Return true if Start is a prefix of Word
to_lower(B::string() | binary() | atom()) -> binary()
Return a lowercase string for the input
to_name(V::string() | binary() | atom() | {trans, list()}) -> binary()
Map a string to a value that can be used as a name or slug. Maps all characters to lowercase and remove non digalpha chars
to_rootname(Filename::file:filename_all()) -> binary()
Filter a filename so that we obtain a basename that is safe to use.
to_slug(Title::string() | binary() | atom()) -> binary()
Map a string to a slug that can be used in the uri of a page. Same as a name, but then with dashes instead of underscores.
to_upper(B::string() | binary() | atom()) -> binary()
Return a uppercase string for the input
trim(B::iodata()) -> binary()
Remove whitespace at the start and end of the string
trim(B::iodata(), Char::integer()) -> binary()
Remove all occurences of a character at the start and end of a string.
trim_left(S::binary() | list()) -> binary() | list()
Remove whitespace at the start the string
trim_left(S::binary() | list(), Char::integer()) -> binary() | list()
Remove all occurences of a char at the start of a string
trim_left_func(Bin, F) -> any()
trim_right(B::iodata()) -> binary()
Remove whitespace at the end of the string
trim_right(B::iodata(), Char::integer()) -> binary()
Remove all occurences of a char at the end of the string
truncate(String::undefined | string() | binary(), Length::integer()) -> undefined | binary()
Truncate a string. Append the '...' character at the place of break off.
truncate(String::undefined | string() | binary(), Length::integer(), Append::binary() | string()) -> binary()
truncatechars(String::undefined | string() | binary(), Length::integer()) -> undefined | binary()
Truncate a string, count all characters. No special handling of entities and tags.
truncatechars(String::undefined | string() | binary(), Length::integer(), Append::binary() | string()) -> binary()
truncatewords(S, Words) -> any()
Truncate a string, count all words. No special handling of entities and tags.
truncatewords(S, Words, Append) -> any()
unquote(S::iodata()) -> iodata()
Remove the first and last char if they are double quotes.
unquote(S, Q) -> any()
Generated by EDoc