# Convert a line with whitespaces into a string containing lin

**URL:** <https://www.ruby-forum.com/t/convert-a-line-with-whitespaces-into-a-string-containing-lin/114966>\
**Category:** Ruby\
**Created:** [September 19, 2007, 11:37am UTC](https://www.ruby-forum.com/t/convert-a-line-with-whitespaces-into-a-string-containing-lin/114966 "2007-09-19T11:37:56Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![vellingiri](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/5fc32e/32.png) [@vellingiri](https://www.ruby-forum.com/u/vellingiri)\
**Post date:** [September 19, 2007, 11:37am UTC](https://www.ruby-forum.com/t/convert-a-line-with-whitespaces-into-a-string-containing-lin/114966/1 "2007-09-19T11:37:56Z")

</div>

Dear Friends,  
Any one answer for this questons.

convert a line with whitespaces into a string containing line breaks  
Thank you.

---

<div class="post-metadata">

**Author:** ![vellingiri](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/5fc32e/32.png) [@vellingiri](https://www.ruby-forum.com/u/vellingiri)\
**Post date:** [September 19, 2007, 11:44am UTC](https://www.ruby-forum.com/t/convert-a-line-with-whitespaces-into-a-string-containing-lin/114966/2 "2007-09-19T11:44:22Z")

</div>

On Sep 19, 2007, at 11:37 AM, Vellingiri A. wrote:

> Dear Friends,  
> Any one answer for this questons.
> 
> convert a line with whitespaces into a string containing line  
> breaks

str = “\n\n”

Now, seriously, is that homework?

– fxn

---

<div class="post-metadata">

**Author:** ![vellingiri](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/5fc32e/32.png) [@vellingiri](https://www.ruby-forum.com/u/vellingiri)\
**Post date:** [September 19, 2007, 11:47am UTC](https://www.ruby-forum.com/t/convert-a-line-with-whitespaces-into-a-string-containing-lin/114966/3 "2007-09-19T11:47:23Z")

</div>

Xavier N. wrote:

> On Sep 19, 2007, at 11:37 AM, Vellingiri A. wrote:
> 
> > Dear Friends,  
> > Any one answer for this questons.
> > 
> > convert a line with whitespaces into a string containing line  
> > breaks
> 
> str = “\n\n”
> 
> Now, seriously, is that homework?
> 
> – fxn

very very Thank you.  
By  
Vellingiri

---

<div class="post-metadata">

**Author:** ![vellingiri](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/5fc32e/32.png) [@vellingiri](https://www.ruby-forum.com/u/vellingiri)\
**Post date:** [September 19, 2007, 12:01pm UTC](https://www.ruby-forum.com/t/convert-a-line-with-whitespaces-into-a-string-containing-lin/114966/4 "2007-09-19T12:01:24Z")

</div>

On Sep 19, 2007, at 11:47 AM, Vellingiri A. wrote:

> > Now, seriously, is that homework?
> > 
> > – fxn
> 
> very very Thank you.

Hmmmm… just in case, that was kind of a joke about the strict  
interpretation of the exercise… modulus a license. That didn’t  
solve the problem. In the first place because that’s not the  
intention of the exercise, and on the other hand because an  
assignment actually does not _convert_ any given string.
