This function creates a string of a specified length containing a specified character. It is commonly used to create indentation in printed output.
Usage
strg_make_space_2(with = "+", n = 50, c = "", last = T)
Arguments
- with
A character to repeat.
- n
An integer specifying the number of times to repeat the character.
- c
A string to separate each repeated character. Defaults to an empty string.
- last
A boolean indicating whether the resulting string should end with a newline character. Defaults to TRUE.
Value
A string of repeated characters separated by the specified separator string.
Examples
if (FALSE) { # \dontrun{
make_space_2(n = 5, with = " ")
make_space_2(n = 5, with = "-", c = "", last = FALSE)
} # }