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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Replace characters in a string

Status
Not open for further replies.

JontyMC

Programmer
Nov 26, 2001
1,276
GB
I have a string with new line characters in such as:

str = "A line\nAnother line\nYet another line";

1. How do remove all the \n characters?
2. How do I replace all the \n characters with another character?

Thanks,

Jon
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top