Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > line break pb

Reply
Thread Tools

line break pb

 
 
steeve_dun@SoftHome.net
Guest
Posts: n/a
 
      10-19-2005
Hi,

I have this kind of code:
Items[0]=['<a
href="#x1">1st</a>']
Items[1]=['<a
href="#x2">2nd</a>']
....
I need to transform it or treat it to have just:
Items[0]=['<a href="#x1">1st</a>']
Items[1]=['<a href="#x2">2nd</a>']
without the line breaks.

Can anybody help me please.
Thanks

-steeve

 
Reply With Quote
 
 
 
 
Gomolyako Eduard
Guest
Posts: n/a
 
      10-19-2005
Hm.. see "replace" method of string type.

Exmaple Items[0] = Items[0].replace("\n", ""); or
Items[0] = Items[0].replace("\n\r", "");

http://www.velocityreviews.com/forums/(E-Mail Removed) писал(а):

> Hi,
>
> I have this kind of code:
> Items[0]=['<a
> href="#x1">1st</a>']
> Items[1]=['<a
> href="#x2">2nd</a>']
> ...
> I need to transform it or treat it to have just:
> Items[0]=['<a href="#x1">1st</a>']
> Items[1]=['<a href="#x2">2nd</a>']
> without the line breaks.
>
> Can anybody help me please.
> Thanks
>
> -steeve


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Read a file line by line and write each line to a file based on the5th byte scad C++ 23 05-17-2009 06:11 PM
`if (!p ? i++ : 0) break;' == `if (!p){ i++; break;}' ? lovecreatesbea...@gmail.com C Programming 12 04-14-2008 07:59 AM
How to read a text file line by line and remove some line kaushikshome C++ 4 09-10-2006 10:12 PM
Beginner: read $array with line breaks line by line Marek Stepanek Perl Misc 12 09-02-2006 10:27 AM
Read a file line by line with a maximum number of characters per line Hugo Java 10 10-18-2004 11:42 AM



Advertisments