Click here to Skip to main content
15,897,226 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
dear friends,

plz consider the below problem.

i am developing window application for xml editing.i have string value like this (eg.,sample quick watch).based on the space(" ")i split the string.after i split, it will be like the below
sample
quick
watch.
then i check every word.after completion i want to form the string in a single line.how can i do the last step?

thanks in advance
Posted

Hi,

try like below.
VB
dim strArr as String() = value.Split(" ")
dim newStr as String = ""
For Each str As String In strArr 
'Do your logic to check the words
newStr += str
Next

'display newStr

hope it helps
 
Share this answer
 
Comments
jai_mca 1-Mar-13 6:08am    
thanks a lot karthik..
Karthik Harve 1-Mar-13 6:16am    
Welcome. !
jai_mca 1-Mar-13 6:29am    
please answer my next question karthik.it is very important for me
Karthik Harve 1-Mar-13 6:37am    
ofcourse, i'll try.
jai_mca 1-Mar-13 6:53am    
YEAH..THANKS AGAIN..
i had post it..
it's about extracting collated pdf
Hi Jai

Try like below:

C#
string strValue = "Ram,suresh";
string[] strArray = strValue.Split(',');
string.Join(",", strArray);
 
Share this answer
 
Comments
jai_mca 1-Mar-13 6:08am    
thanks a lot willington..
willington.d 1-Mar-13 6:44am    
Thanks. Accept as answer if it is working.

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