Fixed spelling error and added new information (#28509)

* Fixed spelling error and added new information

- changed from built in to built-in
- added information for .count method

* Removed redundant construct
This commit is contained in:
Sashweana
2019-02-17 19:25:06 +08:00
committed by Manish Giri
parent 6b4136c854
commit 251fd0f4c1

View File

@ -2,11 +2,11 @@
title: Ruby String Methods
---
## Ruby String Methods
Ruby has many built in methods to work with strings. Strings in Ruby by default are mutable and can be changed in place or a new string can be returned from a method.
Ruby has many built-in methods to work with strings. Strings in Ruby by default are mutable and can be changed in place or a new string can be returned from a method.
### Length:
* The `.length` property returns the number of characters in a string including white-space.
* The `.length` method returns the number of characters in a string including white-space.
```ruby
"Hello".length #=> 5
"Hello World!".length #=> 12