Repeat a string: Difference between revisions
m
→{{header|Go}}: small clarification
m (→{{header|Go}}: small clarification) |
|||
Line 396:
=={{header|Go}}==
<lang go>fmt.Println(strings.Repeat("ha", 5))
There is no special way to repeat a single character, other than to convert the character to a string. The following works:
<lang go>fmt.Println(strings.Repeat(string('h'), 5)) // prints hhhhh</lang>
=={{header|Groovy}}==
|