How do the following methods differ: @my_string.strip and @my_string.strip! ?
Answer / Ramniwas
"@my_string.strip removes leading and trailing whitespaces from a string, but it does not change the original string. On the other hand, @my_string.strip! modifies the original string by removing the leading and trailing whitespaces and returns nil."
| Is This Answer Correct ? | 0 Yes | 0 No |
Can you please explain what is the difference between string and symbol?
How to use sql db or mysql db. Without defining it in the database.yml
What are the different environment variables present in the ruby?
What is the scope of a local variable in ruby?
Explain about operators in Ruby?
Write the command to get installed Ruby version in your system?
Explain Ruby exceptions?
How to read a file in Ruby?
What is Ruby programming language?
What is the difference between “#==” and “#equal?”
What things we can define in the model?
In how many ways items can be removed from array in Ruby?