The Artima Developer Community
Sponsored Link

Java Answers Forum
How to break a string to multiple lines

1 reply on 1 page. Most recent reply: Jan 27, 2003 11:47 AM by Matt Gerrans

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 1 reply on 1 page
Jack

Posts: 1
Nickname: delo5
Registered: Jan, 2003

How to break a string to multiple lines Posted: Jan 27, 2003 10:39 AM
Reply to this message Reply
Advertisement
I?m trying to make a program that would break a string to multiple lines. I would also need to specify the length of the lines let?s say for example 20 characters. The line change would happen when the line is full or the next token is longer than the space on the line. And if a token is longer than the line the token should be printed anyway on a new line.
Like this:
I?m trying to make a
program that would
break a string to
multiple lines. I
would also need to
specify the length
of the lines let?s
say for example 20
characters.

Thanks already


Matt Gerrans

Posts: 1153
Nickname: matt
Registered: Feb, 2002

Re: How to break a string to multiple lines Posted: Jan 27, 2003 11:47 AM
Reply to this message Reply
> I'm trying to make...
> [snip]
> Thanks already

So let's see what you've got so far.

Flat View: This topic has 1 reply on 1 page
Topic: hashtable and hashmap Previous Topic   Next Topic Topic: harddisk free space

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use