Return to Snippet

Revision: 3318
at July 8, 2007 12:46 by asteinhaus


Updated Code
def star = '*'
def lineof80stars = star * 80

def myName = 'Andreas'
def mySister = 'Jana'
def gString = "$myName writes groovy scripts! $mySister corrects the mistakes! ;-)"
def centerText = star + gString.center(78) + star
def centerEmptyLine = star + " ".center(78) + star
def newline = '\n'

print lineof80stars + newline
println centerEmptyLine
println centerText
println centerEmptyLine
print lineof80stars

Revision: 3317
at July 8, 2007 08:45 by asteinhaus


Initial Code
def star = '*'
def lineof80stars = star * 80

def name = 'Andreas'
def gString = "$name writes groovy scripts! Jana corrects the mistakes! ;-)"
def centerText = star + gString.center(78) + star
def centerEmptyLine = star + " ".center(78) + star
def newline = '\n'

print lineof80stars + newline
println centerEmptyLine
println centerText
println centerEmptyLine
print lineof80stars

Initial URL


Initial Description
********************************************************************************
*                                                                              *
*        Andreas writes groovy scripts! Jana corrects the mistakes! ;-)        *
*                                                                              *
********************************************************************************

Initial Title
gString in the middle of a line

Initial Tags
center

Initial Language
Groovy