Change Strings with Line Breaks into Multiple Strings

DESCRIPTION:

Break up strings with newlines into multiple strings.

USAGE:

string.break.line(s)

REQUIRED ARGUMENTS:

s
any S-PLUS object (it will be converted to a vector of character strings)

VALUE:

A list the length of the input. If the ith input string contains n newline ( "\n") characters, it will be split into n+1 substrings at the newline characters.

SEE ALSO:

.

EXAMPLES:

string.break.line(c("Two\nLines", "One Line"))
# gives the following output:
# [[1]]:
# [1] "Two"   "Lines"
# [[2]]:
# [1] "One Line"