Added example to .split (#18736)
This commit is contained in:
@ -90,6 +90,10 @@ _Note that the first letter is only capitalized if it is at the beginning of the
|
|||||||
```ruby
|
```ruby
|
||||||
"H-e-l-l-o".split('-') #=> ["H", "e", "l", "l", "o"]
|
"H-e-l-l-o".split('-') #=> ["H", "e", "l", "l", "o"]
|
||||||
```
|
```
|
||||||
|
* To split a word in to individual letters :
|
||||||
|
``` ruby
|
||||||
|
"hello".split("") #=> ["h", "e", "l", "l", "o"]
|
||||||
|
```
|
||||||
|
|
||||||
### Chop:
|
### Chop:
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user