Repeat in Go

Posted by GoDoc
Public (Editable by Users)

Repeat returns a new string consisting of count copies of the string s.

Go
Edit
package main

import (
	"fmt"
	"strings"
)

func main() {
	fmt.Println("ba" + strings.Repeat("na", 2))
}