Learn R Programming

rPraat (version 1.3.2-1)

str_contains: str_contains

Description

Find string in another string (without regular expressions), returns TRUE / FALSE.

Usage

str_contains(string, patternNoRegex)

Arguments

string

string in which we try to find something

patternNoRegex

string we want to find, "as it is" - no regular exprressions

Value

TRUE / FALSE

See Also

str_find, str_find1, isString

Examples

Run this code
# NOT RUN {
str_contains("Hello world", "wor")  # TRUE
str_contains("Hello world", "WOR")  # FALSE
str_contains(tolower("Hello world"), tolower("wor"))  # TRUE
str_contains("Hello world", "")  # TRUE
# }

Run the code above in your browser using DataLab