Files
the-way-to-go_ZH_CN/eBook/examples/chapter_4/repeat_string.go
2013-04-21 19:25:28 -04:00

15 lines
198 B
Go

package main
import (
"fmt"
"strings"
)
func main() {
var origS string = "Hi there! "
var newS string
newS = strings.Repeat(origS, 3)
fmt.Printf("The new repeated string is: %s\n", newS)
}