Groovy web console

subscribe to the feed Subscribe
to this
site

Strip multiline

Published 2 months ago by kd
Actions  ➤ Edit in console Back to console Show/hide line numbers View recent scripts
s = """This       is
       multiline
"""

print s

s = """\
       This
       is
       multiline
"""

print s

s = """This
       is
       multiline
"""

print s

s = """\
       This
       is
       multiline
"""

print s.stripIndent()

print """\
       This
       is
       multiline
""".stripIndent()