IsSubstring: Test whether 'subvec' is a proper substring of 'fullvec'.

Description Usage Arguments Value See Also Examples

View source: R/utils.R

Description

Test whether subvec is a proper substring of fullvec.

Usage

1
IsSubstring(subvec, fullstr)

Arguments

subvec

A character vector. Its size should be less than or equal to length(fullvec).

fullstr

A character vector. The entire string.

Value

bool. TRUE if subvec \subset fullstr, FALSE otherwise.

See Also

grepl

Examples

1
2
IsSubstring(c("this", "is", "a"), "this is a sentence")  # true
IsSubstring(c("tthis", "is", "a"), "this is a sentence") # false

dimalik/Hrate documentation built on May 24, 2019, 4:01 a.m.