Groovy web console

subscribe to the feed Subscribe
to this
site

test

Published 5 months ago by anon
Actions Execute script  ▶ Edit in console Back to console Show/hide line numbers View recent scripts
def quantity = 'test,'
def charEnd = quantity.charAt(quantity.length() - 1)
        if (charEnd == ',') {
                    quantity = quantity.substring(0, quantity.length() - 1)
}

quantity