dcsimg
htmlbody wrapping function with the following signature String[] wrapText(String entireText, int screenWidth) /body/html
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   rahul_paladugu
Posted On:   Sunday, April 22, 2007 06:39 AM



Write a text wrapping function with the following signature
String[] wrapText(String entireText, int screenWidth) that will wrap a long text contained into the input string entire Text. The text has to be wrapped so that it will fit shorter or equal to the screen width screen Width.


Assume that you have a function charWidth(char a)to get the width of character a(you can return a constant interger for the sake of this exercise).


You can also use s.charAt(int i) to get the character located at index i in string s



Re: htmlbody wrapping function with the following signature String[] wrapText(String entireText, int screenWidth) /body/html

Posted By:   Robert_Lybarger  
Posted On:   Sunday, April 22, 2007 09:40 AM

So this is a homework and/or project exercise, then?
About | Sitemap | Contact