ad <ad@wfes.tcc.edu.tw> wrote:
I have a string variable lik:
sList="1.Tiger, 2.Wolf, 3.Rabbit,"
I want to trim off the last character ","
Have there pre-define function to do that?
If you always want to remove the last character, just use:
sList = sList.Substring (0, sList.Length-1);
Or if it's always going to be a comma, and won't be preceded by a
comma, you could just use:
sList = sList.TrimEnd(',');
--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too