check-vector-isMatching: Does the string match a pattern?

check-vector-isMatchingR Documentation

Does the string match a pattern?

Description

Does the string match a pattern?

Usage

isMatchingFixed(x, pattern)

isMatchingRegex(x, pattern)

isNotMatchingFixed(x, pattern)

isNotMatchingRegex(x, pattern)

allAreMatchingFixed(x, pattern)

allAreMatchingRegex(x, pattern)

allAreNotMatchingFixed(x, pattern)

allAreNotMatchingRegex(x, pattern)

allAreSystemCommands(x)

Arguments

x

Object.

pattern

character(1). Pattern to use for matching.

Value

logical.

Functions

  • isMatchingFixed(): Vectorized.

  • isMatchingRegex(): Vectorized.

  • isNotMatchingFixed(): Vectorized.

  • isNotMatchingRegex(): Vectorized.

  • allAreMatchingFixed(): Scalar.

  • allAreMatchingRegex(): Scalar.

  • allAreNotMatchingFixed(): Scalar.

  • allAreNotMatchingRegex(): Scalar.

  • allAreSystemCommands(): Scalar.

Note

Updated 2022-12-14.

See Also

  • grepl().

  • stringi::stri_detect_regex().

  • stringi::stri_detect_fixed().

  • stringr::str_detect().

  • assertive.strings::is_matching_regex().

  • assertive.strings::is_matching_fixed().

  • assertive.strings::is_not_matching_regex().

  • assertive.strings::is_not_matching_fixed().

Examples

## TRUE ====
isMatchingRegex(x = "foobar", pattern = "^f")
isNotMatchingRegex(x = "foobar", pattern = "^b")

isMatchingFixed(x = "foobar", pattern = "bar")
isNotMatchingFixed(x = "foo", pattern = "bar")

acidgenomics/goalie documentation built on Dec. 11, 2023, 11:36 p.m.