Groovy web console

subscribe to the feed Subscribe
to this
site
first letters (via #groovywebconsole)
tweet this snippet Tweet
this
script

first letters

Published 2 weeks ago by God with tags groovy string readlines
Actions  ➤ Edit in console Back to console Show/hide line numbers View recent scripts
def projectString = """first line
useless line
choose a last line
k this will do"""

projectString = projectString
    .readLines()
    .collect { it[0] }
    .join()
println projectString