The grepl() function can be used to check if a character or a substring is present in a string.
Here is an example:
> a="Hello world!!"> grepl('Hello', a)[1] TRUE> grepl('Hello1', a)[1] FALSE> grepl('H', a)[1] TRUE> grepl('h', a)[1] FALSE