add Concat method (#204)

* feat(strutil): add Concat method

* feat(strutil): add Concat method
This commit is contained in:
Cannian authored and GitHub committed 2024-03-25 10:26:37 +08:00
1 parent bb6f10a1fb
commit e9280b8c25
5 files changed
+124 -2

No files matched your search

+14
View File
@@ -680,3 +680,17 @@ func ExampleHammingDistance() {
// 3
// 1
}
func ExampleConcat() {
result1 := Concat(12, "Hello", " ", "World", "!")
result2 := Concat(11, "Go", " ", "Language")
result3 := Concat(0, "An apple a ", "day,", "keeps the", " doctor away")
fmt.Println(result1)
fmt.Println(result2)
fmt.Println(result3)
// Output:
// Hello World!
// Go Language
// An apple a day,keeps the doctor away
}