Added include? method (#27129)

* Added include? method

* Added include? method

* Add colon for consistent formatting
This commit is contained in:
Shafrazi
2019-02-17 16:40:24 +05:30
committed by Manish Giri
parent 93537670c0
commit 9988a61c56

View File

@ -189,5 +189,14 @@ _Note that the first letter is only capitalized if it is at the beginning of the
a = "abcde"
a.clear #=> ""
```
### Include?:
* Returns true if the string contains the given string or character as an argument.
```ruby
"abcde".include?("bc") #=> true
"abcde".include?("pqr") #=> false
```