R/has_leading_punctuation.R

Defines functions has_leading_punct

Documented in has_leading_punct

#' Logical for strings that have 1 or more leading punctuation marks
#' @export

has_leading_punct <-
        function(strings) {
                output <- vector()
                for(string in strings) {
                        output <- c(output, grepl("^[[::punct::]]{1,}", string))
                }
                return(output)
        }
meerapatelmd/centipede documentation built on Jan. 1, 2021, 9:27 a.m.