Advertisement

07.02.2008 at 11:44AM PDT, ID: 23534634
[x]
Attachment Details

how to trim a string with all the trailing spaces.

Asked by mathieu_cupryk in C# Programming Language, Microsoft Visual Basic.Net, Microsoft Visual C#.Net

tem01,Item NumberCANADA WESTERN FEED                                                             ,SCT Number135,GRAIN_CLASS_NAME127,MT119.50
Item01,Item NumberCANADA WESTERN FEED (Can. Red Prairie Spring)                                   ,SCT Number135,GRAIN_CLASS_NAME127,MT119.50
Item01,Item NumberCANADA WESTERN FEED (Can. White Prairie Spring)                                 ,SCT Number135,GRAIN_CLASS_NAME127,MT119.50
Item01,Item NumberCANADA WESTERN FEED (Extra Strong)                                              ,SCT Number135,GRAIN_CLASS_NAME127,MT119.50
Item01,Item NumberCANADA WESTERN FEED (Red Spring)                                                ,SCT Number135,GRAIN_CLASS_NAME127,MT119.50
Item01,Item NumberCANADA WESTERN FEED (Red Winter)                                                ,SCT Number135,GRAIN_CLASS_NAME127,MT119.50
Item01,Item NumberMIXED GRAIN CANADA WESTERN - WHEAT                                              ,SCT Number121.50,GRAIN_CLASS_NAME113.50,MT106

for the first line
CANADA WESTERN FEED                                                            
                                          --------------------------------------------
dt.Columns[1].ToString().TrimEnd()
this does not work.Start Free Trial
[+][-]07.02.2008 at 11:54AM PDT, ID: 21919446

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.02.2008 at 11:55AM PDT, ID: 21919452

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.02.2008 at 12:15PM PDT, ID: 21919662

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.02.2008 at 12:18PM PDT, ID: 21919684

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.02.2008 at 12:24PM PDT, ID: 21919735

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.02.2008 at 12:34PM PDT, ID: 21919827

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: C# Programming Language, Microsoft Visual Basic.Net, Microsoft Visual C#.Net
Sign Up Now!
Solution Provided By: Idle_Mind
Participating Experts: 5
Solution Grade: A
 
 
[+][-]07.02.2008 at 12:44PM PDT, ID: 21919940

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628