阅读(3727) (6)

GoFrame gstr-字符串创建

2022-04-11 15:13:24 更新

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
}