Given a String inputStr
and a String subStr
, return true
if inputStr
contains subStr
otherwise return false
.
Example 1:
Input: inputStr = 'I love to code', subStr = 'code'
Output: true
Explanation: The input string contains the word 'code'.
Example 2:
Input: inputStr = 'I FREAKING LOVE TO CODE', subStr = 'code'
Output: true
Explanation: The input string does contain the word 'code'.
Example 3:
Input: inputStr = 'I only use Flow', subStr = 'code'
Output: false
Explanation: The input string does not contain the word 'code'.
Example 3:
Input: inputStr = 'I only use Flow', subStr = 'flow'
Output: true
Explanation: The input string does contain the word 'flow'.
Constraints:
- inputStr and subStr can be of any length.
- inputStr and subStr may be null
- The search should be case insensitive.