Click here to Skip to main content
15,892,965 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I'm trying to con-cat the string...
If on new line there is any string is available then con-cat this string with all previous string in 1 line.

e.g.
Name=
Mahesh A. Wani

Address=
Ganesh Colony, Ring Road
Jalgaon-425001

I want the above input text as follows:

Name=Mahesh A. Wani

Address=Ganesh Colony, Ring RoadJalgaon-425001
Posted
Updated 29-Mar-15 18:42pm
v2
Comments
Suvendu Shekhar Giri 30-Mar-15 0:30am    
What have you tried so far? You know all the conditions so why not give a try?
[no name] 30-Mar-15 0:38am    
Why dont you use string.Replace and replace. Something like Address.Replace(Environment.NewLine, string.Empty);
Sergey Alexandrovich Kryukov 30-Mar-15 0:41am    
What's the problem? What have you tried so far?
—SA

1 solution

Check condition first for new line if there is a line then try to put a backward slash that take you on the previous line then you may easily con-cat string
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900