IsSubstring | R Documentation |
subvec
is a proper substring of fullvec
.Test whether subvec
is a proper substring of fullvec
.
IsSubstring(subvec, fullstr)
subvec |
A character vector. Its size should be less than or equal to |
fullstr |
A character vector. The entire string. |
bool. TRUE if subvec \subset
fullstr, FALSE otherwise.
grepl
IsSubstring(c("this", "is", "a"), "this is a sentence") # true
IsSubstring(c("tthis", "is", "a"), "this is a sentence") # false
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.