Kann Golang multiplizieren Zeichenfolgen wie Python kann?

Python können strings multiplizieren und zwar so:

Python 3.4.3 (default, Mar 26 2015, 22:03:40)
[GCC 4.9.2] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> x = 'my new text is this long'
>>> y = '#' * len(x)
>>> y
'########################'
>>>

Kann Golang machen Sie das gleiche irgendwie?

InformationsquelleAutor Duke Dougal | 2015-10-15
Schreibe einen Kommentar