breaking a Textstring into pieces

Results 1 to 2 of 2

Thread: breaking a Textstring into pieces

  1. #1
    Join Date
    Dec 1969

    Default breaking a Textstring into pieces

    My output for a form is generated by a simple loop, but the output is a textstring with any delimiter.<BR>Now i need to break up te string into pieces to make nice linebreaks for my output.<BR><BR>Can&#039t figure it out.<BR>It probably is very easy, but i have no clue<BR><BR>plz Help<BR><BR>Danny

  2. #2
    Dan Evans Guest

    Default RE: breaking a Textstring into pieces

    You could either do a .split on that delimiter:<BR><BR>arrOutput = strOutput.split("&#124"); // Where &#124 is the delimiter<BR><BR>Or you could just replace all instances of the delimiter with a break:<BR><BR>strOutput = strOutput.replace(/&#124/g, "<BR>"); Where &#124 is the delimiter (Since &#124 is a special character, we use &#124)<BR><BR>Hope this helps,<BR><BR>-Dan Evans

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts