Remove the last character

  • Thread starter Thread starter blackdevil1979
  • Start date Start date
B

blackdevil1979

Hi,

I use a combobox to get a list of fruits (_SelectedIndexChanged)... I
manage to get

Apple, Orange, Grape,

The question: How to get rid of the last comma (Grape
,
<--)

thanks.
 
Hi Blackdevil


In a string when you are sure the lastcharacter is the lastcomma

mytext = combobox.text.substring(0, combobox.substring.text.length-2)

When you do not know it
first
if combobox.text.lenght-2 = "," etc

I hope this helps?

Cor
 
Back
Top