Problem Statement | |||||||||||||
We are looking for occurrences of the string "red" in a piece of text. For example, in the text the detective questioned his credibility we find "red" inside the word "credibility". Capitalization doesn't matter, so in the text Server ERRED in Redirecting Spam we find "red" at the end of "ERRED", as well as at the beginning of "Redirecting". Given a String, count the number of times "red" appears in it with any capitalization. | |||||||||||||
Definition | |||||||||||||
| |||||||||||||
Constraints | |||||||||||||
- | text will contain between 1 and 50 characters, inclusive. | ||||||||||||
- | text will contain only letters ('A'-'Z', 'a'-'z') and spaces (' '). | ||||||||||||
Examples | |||||||||||||
0) | |||||||||||||
| |||||||||||||
1) | |||||||||||||
| |||||||||||||
2) | |||||||||||||
| |||||||||||||
3) | |||||||||||||
| |||||||||||||
4) | |||||||||||||
|