34,333
edits
Changes
→Ruby Here Documents
Thank you for your business.
</pre>
== Getting Information About String Objects ==
The String object includes a number of methods that can be used to obtain information about the string. For example, we can find if a string is empty using the ''empty?'' method:
<pre>
myString = ""
=> ""
myString.empty?
=> true
</pre>
It is also possible to find the length of a string using the ''length'' and ''size'' methods:
<pre>
myString = "Hello"
myString.length
=> 5
</pre>