% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/zz_help_files.R
\name{sf_grepl}
\alias{sf_grepl}
\title{sf_grepl}
\usage{
sf_grepl(subject, pattern, encode_mode = "auto", fixed = FALSE, 
nthreads = getOption("stringfish.nthreads", 1L))
}
\arguments{
\item{subject}{The subject character vector to search}

\item{pattern}{The pattern to search for}

\item{encode_mode}{"auto", "UTF-8" or "byte". Determines multi-byte (UTF-8) characters or single-byte characters are used.}

\item{fixed}{determines whether the pattern parameter should be interpreted literally or as a regular expression}

\item{nthreads}{Number of threads to use}
}
\value{
A logical vector with the same length as subject
}
\description{
A function that matches patterns and returns a logical vector
}
\details{
The function uses the PCRE2 library, which is also used internally by R. 
The encoding is based on the pattern string (or forced via the encode_mode parameter). 
Note: the order of paramters is switched compared to the `grepl` base R function, with subject being first.
}
\examples{
x <- sf_vector(10)
sf_assign(x, 1, "hello world")
pattern <- "^hello"
sf_grepl(x, pattern)
}
\seealso{
grepl
}
