caps/1 | Equivalent to caps(String, {$\s, $\s}). |
caps/2 | Capitalizes each letter that is not preceded by a letter. |
chomp/1 | Removes all newlines from the end of a string. |
columns/2 | Translates string into list of strings by columns. |
extract/2 | Extracts a field at a given location from a string. |
extract/3 | Extracts a field at a given location with a given width. |
fields/3 | Translates string into list of strings by fields. |
join/2 | Joins strings with a delimeter between each part. |
join/3 | Joins strings with a delimeter between each part and a second delimeter between the last two parts. |
keyvalue/1 | Equivalent to keyvalue(string(), ":"). |
keyvalue/2 | Gets the key and value from a line of text. |
lc/1 | Translates a string to lowercase. |
pad/2 | Pads a string to a given width in characters. |
pad/3 | Pads a string to a given width in characters. |
quote_regexp/1 | Inserts escape chars into string to make it a literal regexp. |
remove_eol/1 | Removes a single newline from the end of a string. |
split/2 | Splits a string on each occurance of a delimeter. |
strip_quotes/1 | Equivalent to strip_quotes(string(), $"). |
strip_quotes/2 | Strips leading and trailing quotes from a string. |
uc/1 | Translates a string to uppercase. |
caps(S::string() | atom()) -> string()
Equivalent to caps(String, {$\s, $\s}).
caps(S::string() | atom(), X2::{char(), char()}) -> string()
Capitalizes each letter that is not preceded by a letter. Also translates one character to another, typically for turning underscores into hyphens or spaces for human-readability.
chomp(List::string()) -> string()
Removes all newlines from the end of a string. Should work on both 'nix and MS-DOS newlines.
Translates string into list of strings by columns.
e.g. columns("1234567890", [{2,3},{8,2}]) -> ["234", "89"]
extract(String::string(), Start::integer()) -> string()
Extracts a field at a given location from a string. Returns the field with spaces stripped off.
extract(String::string(), Start::integer(), Length::integer()) -> string()
Extracts a field at a given location with a given width. Returns the field with spaces stripped off.
fields(String::string(), Delim::string(), Quote::string()) -> [string()]
Translates string into list of strings by fields.
e.g. fields("a,'b,c',d", ",", "'") -> ["a","b,c","d"]
join(P::string(), L::[string()]) -> string()
Joins strings with a delimeter between each part.
join(P::string(), Q::string(), L::[string()]) -> string()
Joins strings with a delimeter between each part
and a second delimeter between the last two parts.
e.g. join(", ", ", and ", ["A","B","C"]) -> "A, B, and C"
keyvalue(String::string()) -> {string(), string()}
Equivalent to keyvalue(string(), ":").
keyvalue(String::string(), Delim::string()) -> {string(), string()}
Gets the key and value from a line of text. Can be used to parse simple mail headers, http headers, etc.
lc(L::string()) -> string()
Translates a string to lowercase. Also flattens the list.
pad(String::string(), Width::integer()) -> string()
Pads a string to a given width in characters.
pad(String::string(), Width::integer(), X3::left | right | centre) -> string()
Pads a string to a given width in characters.
quote_regexp(String::string()) -> string()
Inserts escape chars into string to make it a literal regexp.
This way, characters which have special meaning in regular expressions
can be used within a regular expression.
Similar to Perl's quotemeta
function.
remove_eol(S::string()) -> string()
Removes a single newline from the end of a string. Should work on both 'nix and MS-DOS newlines.
split(D::char(), L::string()) -> [string()]
Splits a string on each occurance of a delimeter. e.g. split($+, "a+b++c") -> ["a", "b", "", "c"]
strip_quotes(S::string()) -> string()
Equivalent to strip_quotes(string(), $").
strip_quotes(S::string(), Q::char()) -> string()
Strips leading and trailing quotes from a string.
uc(L::string()) -> string()
Translates a string to uppercase. Also flattens the list.
Generated by EDoc, Feb 18 2008, 06:48:06.