GoFrame gstr-字符串創(chuàng)建

2022-04-11 15:27 更新

Repeat

  • 說(shuō)明:?Repeat?返回一個(gè)由?input?重復(fù)?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
}


以上內(nèi)容是否對(duì)您有幫助:
在線筆記
App下載
App下載

掃描二維碼

下載編程獅App

公眾號(hào)
微信公眾號(hào)

編程獅公眾號(hào)