Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

string replace line breaks 1

Status
Not open for further replies.

kaancho12

Technical User
Joined
Feb 22, 2005
Messages
191
hi,
is there a way i can check for line breaks and/or tabs within a string and replace/remove them.
thanks
 

try something like this:
Code:
s = s.replace("\n", "");

Been a while since I did java but I think /t is the escape code for tab, so you'd have to do it again with /t

-kaht

...looks like you don't have a job, so why don't you get out there and feed Tina.
[banghead]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top