mirror of
https://github.com/duke-git/lancet.git
synced 2026-02-04 21:02:27 +08:00
add Concat method (#204)
* feat(strutil): add Concat method * feat(strutil): add Concat method
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user