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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top