how to get rid of blanks

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

hi

I want the empty spaces to be removed after a string has been entered by a user
i.e how do i get rid of the trailing blanks in the following string....
'John
So that the value now displays
'John


Any help is appreciated.
 
Jade said:
hi,

I want the empty spaces to be removed after a string has been entered by a user.
i.e how do i get rid of the trailing blanks in the following string.....
'John '
So that the value now displays
'John'
?

Any help is appreciated.

"John ".TrimEnd();
 
Back
Top