Added include? method (#27129)
* Added include? method * Added include? method * Add colon for consistent formatting
This commit is contained in:
@ -189,5 +189,14 @@ _Note that the first letter is only capitalized if it is at the beginning of the
|
|||||||
a = "abcde"
|
a = "abcde"
|
||||||
a.clear #=> ""
|
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
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user