File: fixed.Rd

package info (click to toggle)
r-cran-stringr 0.6.2-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 308 kB
  • sloc: makefile: 3
file content (27 lines) | stat: -rw-r--r-- 593 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
\name{fixed}
\alias{fixed}
\title{Match fixed characters, not regular expression.}
\usage{
  fixed(string)
}
\arguments{
  \item{string}{string to match exactly as is}
}
\description{
  This function specifies that a pattern is a fixed string,
  rather than a regular expression.  This can yield
  substantial speed ups, if regular expression matching is
  not needed.
}
\examples{
pattern <- "a.b"
strings <- c("abb", "a.b")
str_detect(strings, pattern)
str_detect(strings, fixed(pattern))
}
\seealso{
  Other modifiers: \code{\link{ignore.case}},
  \code{\link{perl}}
}
\keyword{character}