- Trending Categories
- Data Structure
- Operating System
- C Programming
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to check if a string is a subset of another string in R?
To check whether a string is a subset of another string we can use grepl function.
> Company <- "TutorialsPoint" > Job <- "Tutor" > grepl(Job, Company, fixed = TRUE)  TRUE
Here we are getting TRUE because Tutor is a subset of TutorialsPoint.
> grepl(Company, Job, fixed = TRUE)  FALSE
Here we are getting FALSE because TutorialsPoint is not a subset of Tutor.
- How to check if a set is a subset of another set in R?
- Check if a string is suffix of another in Python
- Check If a String Can Break Another String in C++
- How to check if a substring is contained in another string in Python
- Check if string contains another string in Swift
- Java Program to Check if a set is the subset of another set
- How to check if a String contains another String in a case insensitive manner in Java?
- Check if a string can be repeated to make another string in Python
- Check if a given string is sum-string in C++
- How to check if a string contains a specific sub string?
- How to check if a string is alphanumeric in Python?
- How to check if a string is empty in Kotlin?
- Python - Check if a variable is string
- How to check if type of a variable is string in Python?