Logo 
Search:

Java Answers

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds
  Question Asked By: Charlie Miller   on Jul 31 In Java Category.

  
Question Answered By: Carl Woods   on Jul 31

I think you mean <BR> but WTH

String killThoseLinefeeds(String str)
StringBuffer buf = new StringBuffer();
for(int i=0; i< str.size(); i++)
{
char ch = str.charAt(i);
if(ch=='\n')
buf.append("<B>");
else
buf.append("<B>");
}
return buf.toString();
}
or StringTokenizer tok = new StringTokenizer(str, "\n");
while(tok.hasMoreTokens())
buf.append(tok.nextToken();

or a million other really easy bits of code....

Share: 

 

This Question has 5 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on replacing /n with <B >in jdk1.3 Or get search suggestion and latest updates.


Tagged: