string.break.line

0th

Percentile

Break a String into Many Lines at Newlines

Takes a string and breaks it into seperate substrings where there are newline characters.

Keywords
print, character
Usage
string.break.line(string)
Arguments
string

character vector to be separated into many lines.

Value

Returns a list that is the same length of as the string argument.

Each list element is a character vector.

Each character vectors elements are the split lines of the corresponding element in the string argument vector.

See Also

strsplit

Aliases
  • string.break.line
Examples
# NOT RUN {
a <- c('', 'this is a single line string',
       'This is a\nmulti-line string.')

b <- string.break.line(a)
# }
Documentation reproduced from package Hmisc, version 4.0-3, License: GPL (>= 2)

Community examples

Looks like there are no examples yet.