From 4f6fb22e7f48265db489e89e8bf3c3da1c49bbb0 Mon Sep 17 00:00:00 2001 From: Shafrazi Date: Tue, 16 Oct 2018 01:15:21 +0530 Subject: [PATCH] Added example to .split (#18736) --- .../pages/guide/english/ruby/ruby-string-methods/index.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/client/src/pages/guide/english/ruby/ruby-string-methods/index.md b/client/src/pages/guide/english/ruby/ruby-string-methods/index.md index 6818450993..5e1b11d7ae 100644 --- a/client/src/pages/guide/english/ruby/ruby-string-methods/index.md +++ b/client/src/pages/guide/english/ruby/ruby-string-methods/index.md @@ -90,7 +90,11 @@ _Note that the first letter is only capitalized if it is at the beginning of the ```ruby "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: * The `.chop` method removes the last character of the string.