后浪云GoFrame教程:GoFrame gstr-字符串创建

Repeat

  • 说明:​Repeat​返回一个由​input​重复​multiplier​次后组成的新字符串。  
  • 格式:
Repeat(input string, multiplier int) string

  • 示例:
func ExampleRepeat() {
	var (
		input      = `goframe `
		multiplier = 3
		result     = gstr.Repeat(input, multiplier)
	)
	fmt.Println(result)

	// Output:
	// goframe goframe goframe
}

THE END