1. Home
  2. Computing & Technology
  3. JavaScript
photo of Stephen Chapman
Stephen's JavaScript Blog

By Stephen Chapman, About.com Guide to JavaScript since 2004

Breaking Text into Chunks

Tuesday October 14, 2008
Usually when writing something in code the text is broken up into a number of chunks each of which contains the same number of characters.

There are of course other reasons why you might want to split up a string of text into a number of pieces that all contain the same number of characters. We can easily add our own method to JavaScript that will do this with just a couple of lines of code.

Breaking Text into Chunks
Comments

No comments yet. Leave a Comment

Leave a Comment

Line and paragraph breaks are automatic. Some HTML allowed: <a href="" title="">, <b>, <i>, <strike>

Explore JavaScript
About.com Special Features

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

Easy ways to connect two computers for networking purposes. More >

  1. Home
  2. Computing & Technology
  3. JavaScript

©2009 About.com, a part of The New York Times Company.

All rights reserved.