squish_whitespace | R Documentation |
This function is mostly a wrapper around str_squish
,
with the additional option to remove hyphens at the ends of lines.
squish_whitespace(text, remove_terminal_hyphens = TRUE)
text |
A character vector to clean. |
remove_terminal_hyphens |
Logical; should hyphens at the end of lines after a word be removed? For example, "un-\nbroken" would become "unbroken". |
The character vector with spacing at the start and end removed, and with internal spacing reduced to a single space character each.
sample_text <- "This had many space char-\\nacters."
squish_whitespace(sample_text)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.