:: String -> [String]

lines breaks a string up into a list of strings at newline characters. The resulting strings do not contain newlines. Note that after splitting the string at newline characters, the last part of the string is considered a line even if it doesn't end with a newline. For example,
>>> lines ""
[]
>>> lines "\n"
[""]
>>> lines "one"
["one"]
>>> lines "one\n"
["one"]
>>> lines "one\n\n"
["one",""]
>>> lines "one\ntwo"
["one","two"]
>>> lines "one\ntwo\n"
["one","two"]
Thus lines s contains at least as many elements as newlines in s.
words breaks a string up into a list of words, which were delimited by white space.
>>> words "Lorem ipsum\ndolor"
["Lorem","ipsum","dolor"]
Given a string of concatenated strings, separate each by removing a layer of quoting and/or escaping of certain characters. These characters are: any whitespace, single quote, double quote, and the backslash character. The backslash character always escapes (i.e., passes through without further consideration) the character which follows. Characters can also be escaped in blocks by quoting (i.e., surrounding the blocks with matching pairs of either single- or double-quotes which are not themselves escaped). Any whitespace which appears outside of either of the quoting and escaping mechanisms, is interpreted as having been added by this special concatenation process to designate where the boundaries are between the original, un-concatenated list of strings. These added whitespace characters are removed from the output.
unescapeArgs "hello\\ \\\"world\\\"\n" == escapeArgs "hello \"world\""
Like showLitString (expand escape characters using Haskell escape conventions), but * break the string into multiple lines * wrap the entire thing in double quotes Example: showMultiLineString "hellongoodbyenblah" returns [""hello\n\", "\goodbyen\", "\blah""]
Helper function to split a string into a list of arguments. It's supposed to handle quoted things sensibly, eg:
splitArgs "--foo=\"C:/Program Files/Bar/" --baz"
= ["--foo=C:/Program Files/Bar", "--baz"]
splitArgs "\"-DMSGSTR=\\\"foo bar\\\"\" --baz"
= ["-DMSGSTR=\"foo bar\"","--baz"]
Given a string, split into the available arguments. The inverse of joinArgs.
Splits a string around whitespace. Empty elements in the result list are automatically removed.
Similar to NameManip but the first element won't be /.
nice_slice "/" -> []
nice_slice "/foo/bar" -> ["foo", "bar"]
Split a path in components. Repeated "/" characters don't lead to empty components. "." path components are removed. If the path is absolute, the first component will start with "/". ".." components are left intact. They can't be simply removed, because the preceding component might be a symlink. In this case, realpath is probably what you need. The case that the path is empty, is probably an error. However, it is treated like ".", yielding an empty path components list. Examples:
slice_path "/"        = ["/"]
slice_path "/foo/bar" = ["/foo","bar"]
slice_path "..//./"   = [".."]
slice_path "."        = []
See unslice_path, realpath, realpath_s.
Split a file name in components. This are the base file name and the suffixes, which are separated by dots. If the name starts with a dot, it is regarded as part of the base name. The result is a list of file name components. The filename may be a path. In this case, everything up to the last path component will be returned as part of the base file name. The path gets normalised thereby. No empty suffixes are returned. If the file name contains several consecutive dots, they are regared as part of the preceding file name component. Concateneting the name components and adding dots, reproduces the original name, with a normalised path: concat . intersperse "." . slice_filename == normalise. Note that the last path component might be "..". Then it is not possible to deduce the refered directory's name from the path. An IO action for getting the real path is then necessary. Examples:
slice_filename "a.b//./.foo.tar.gz" == ["a.b/.foo","tar","gz"]
slice_filename ".x..y."             == [".x.", "y."]
See unslice_filename, slice_filename'.
This is a variant of slice_filename. It is like slice_filename, except for being more efficient, and the filename must not contain any preceding path, since this case isn't considered. See slice_filename, unslice_filename.
Get the path components from a String.
linesCR breaks a String up into a list of Strings at newline Chars. It is very similar to lines, but it also removes any trailing '\r' Chars. The resulting String values do not contain newlines or trailing '\r' characters.
Return the aliases for a given converter or alias name.
Returns a list of languages appropriate for the given file extension.
Split lines in a string using newline as separation. Note that carriage return preceding a newline are also strip for maximum compatibility between Windows and Unix system.
Split words in a string using spaces as separation
words "Hello Foundation"
Quote-aware version of words - don't split on spaces which are inside quotes. NB correctly handles "a'b" but not "'a'". Can raise an error if parsing fails.
Split a string at the commas and remove leading spaces.