strSplitAtChar: Split a character object into multiple lines

Description Usage Arguments Details

Description

Split a character object at a specific character to wrap to multiple lines for plotting

Usage

1
2
strSplitAtChar(object, size, char = ".", separator = paste("\n", char,
  sep = ""), ...)

Arguments

object

Input character vector (should be length 1)

size

The maximum number of characters in one piece

char

The character to split the input string at

separator

The character to use as a separator in the returned object

...

Other arguments (unused)

Details

This will take a long character object and split it into pieces at character char such that the length of each piece is <= size. If separator is passed, the individual pieces will be concatenated using the separator character and returned as a character vector of length 1. Otherwise each piece will be returned as a separate element of a character vector.


tlocoh documentation built on May 2, 2019, 5:27 p.m.