adspace


What is concatenating string in ruby. In how many ways you can create a concatenating string.

Answer Posted / Avinash Verma

Concatenation in Ruby refers to combining multiple strings together. There are several ways to concatenate strings:
1. Using the '+' operator: 'str1' + 'str2'
2. Using << for append operation: 'str' << 'append_string'
3. Using the 'n' operator for multi-line strings: 'str1nstr2'

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Tell me the role of modules and mixins in ruby?

66