Home All Groups Group Topic Archive Search About

Take out last character from textbox or label

Author
9 Jun 2005 9:40 PM
tshad
I am trying to find the best way to delete the last character from a
textbox.

For example:

status.text = "full/part/"

I want to take out the trailing "/".

Thanks,

Tom

Author
9 Jun 2005 10:05 PM
Mike Salter
string s = "xxx/";
s = s.TrimEnd("/".ToCharArray());
--
Mike

Show quoteHide quote
"tshad" <tscheider***@ftsolutions.com> wrote in message
news:eegYcvTbFHA.2896@TK2MSFTNGP10.phx.gbl...
>I am trying to find the best way to delete the last character from a
>textbox.
>
> For example:
>
> status.text = "full/part/"
>
> I want to take out the trailing "/".
>
> Thanks,
>
> Tom
>

Bookmark and Share