Groovy web console

subscribe to the feed Subscribe
to this
site

isInt

Published 1 month ago by Anonymous
Actions Execute script  ▶ Edit in console Back to console Show/hide line numbers View recent scripts
mystring = '25';

if (mystring.isInteger() ) {
    println mystring.toInteger();
} else {
    println mystring
}