delete last character in string

Posted on 2006-03-28
Last Modified: 2009-07-29

I'm creating an array w/ a loop in asp to use in some javascript.  I'm looping through my records and appending each record to the end of the array w/ a comma,

however the last record leaves a rougue comma at the end of the string that is guffing things up.  I've checked my handy asp function ref. but didn't see anything i could obviously use.  Any suggestions?

Question by:dirklance
    LVL 52

    Accepted Solution

    Try this:

       YourString = Left(YourString, Len(YourString) - 1)
    LVL 19

    Assisted Solution

    Hi dirklance,

    string = left(string,len(string)-1)

    Hope this helps,
    LVL 19

    Expert Comment


    Fogot to refesh again... ;)

    Author Comment


    thanks guys,

    Featured Post

    Top 6 Sources for Identifying Threat Actor TTPs

    Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

    Join & Write a Comment

    I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
    I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:  The Exchange of information …
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

    730 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now