From 65b218ebe0aec09c47f489d2e04760101ea3119d Mon Sep 17 00:00:00 2001 From: Kyle F Butts Date: Thu, 19 Jan 2023 08:32:28 -0700 Subject: [PATCH] Improve `str_detect` documentation (#496) Fixes #489 --- R/detect.R | 2 +- man/str_detect.Rd | 2 +- man/str_starts.Rd | 2 +- man/str_subset.Rd | 2 +- man/str_which.Rd | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/R/detect.R b/R/detect.R index 5c62f337..bdfdd970 100644 --- a/R/detect.R +++ b/R/detect.R @@ -21,7 +21,7 @@ #' [boundary()]. An empty pattern, "", is equivalent to #' `boundary("character")`. #' -#' @param negate If `TRUE`, return non-matching elements. +#' @param negate If `TRUE`, inverts the resulting boolean vector. #' @return A logical vector the same length as `string`/`pattern`. #' @seealso [stringi::stri_detect()] which this function wraps, #' [str_subset()] for a convenient wrapper around diff --git a/man/str_detect.Rd b/man/str_detect.Rd index fa8b5d1b..965af1a1 100644 --- a/man/str_detect.Rd +++ b/man/str_detect.Rd @@ -25,7 +25,7 @@ Match character, word, line and sentence boundaries with \code{\link[=boundary]{boundary()}}. An empty pattern, "", is equivalent to \code{boundary("character")}.} -\item{negate}{If \code{TRUE}, return non-matching elements.} +\item{negate}{If \code{TRUE}, inverts the resulting boolean vector.} } \value{ A logical vector the same length as \code{string}/\code{pattern}. diff --git a/man/str_starts.Rd b/man/str_starts.Rd index 2ea0a567..37b4b6c7 100644 --- a/man/str_starts.Rd +++ b/man/str_starts.Rd @@ -22,7 +22,7 @@ Match a fixed string (i.e. by comparing only bytes), using \code{\link[=fixed]{f is fast, but approximate. Generally, for matching human text, you'll want \code{\link[=coll]{coll()}} which respects character matching rules for the specified locale.} -\item{negate}{If \code{TRUE}, return non-matching elements.} +\item{negate}{If \code{TRUE}, inverts the resulting boolean vector.} } \value{ A logical vector. diff --git a/man/str_subset.Rd b/man/str_subset.Rd index 5f72bd17..61a259b8 100644 --- a/man/str_subset.Rd +++ b/man/str_subset.Rd @@ -25,7 +25,7 @@ Match character, word, line and sentence boundaries with \code{\link[=boundary]{boundary()}}. An empty pattern, "", is equivalent to \code{boundary("character")}.} -\item{negate}{If \code{TRUE}, return non-matching elements.} +\item{negate}{If \code{TRUE}, inverts the resulting boolean vector.} } \value{ A character vector, usually smaller than \code{string}. diff --git a/man/str_which.Rd b/man/str_which.Rd index 872c95c1..26539db6 100644 --- a/man/str_which.Rd +++ b/man/str_which.Rd @@ -25,7 +25,7 @@ Match character, word, line and sentence boundaries with \code{\link[=boundary]{boundary()}}. An empty pattern, "", is equivalent to \code{boundary("character")}.} -\item{negate}{If \code{TRUE}, return non-matching elements.} +\item{negate}{If \code{TRUE}, inverts the resulting boolean vector.} } \value{ An integer vector, usually smaller than \code{string}.