R/str_wrap_sieroty.R

Defines functions str_wrap_sieroty

Documented in str_wrap_sieroty

#' Zawijanie etykiet na sierotach typograficznych
#'
#' @param string etykieta
#' @param width szerokosc etykiety
#'
#' @export
#'
str_wrap_sieroty <- function(string, width) {
    x <- str_wrap(string = string, width = width)
    x <- gsub(pattern = ' w\n',replacement = '\nw ',x = x)
    x <- gsub(pattern = ' i\n',replacement = '\ni ',x = x)
    x <- gsub(pattern = ' z\n',replacement = '\nz ',x = x)
    return(x)
}
jakubnowicki/labstatgraph documentation built on May 18, 2019, 11:17 a.m.