Исходники и презентации

This commit is contained in:
2025-05-23 07:26:39 +03:00
parent aa948179d5
commit 02d8430a3a
514 changed files with 13773 additions and 0 deletions

View File

@ -0,0 +1,17 @@
package main
import "fmt"
func main() {
hello := []byte("Hello ")
world := "world!"
helloWorld1 := append(hello, world...) // sugar
fmt.Println(string(helloWorld1))
helloWorld2 := make([]byte, len(hello)+len(world))
copy(helloWorld2, hello)
copy(helloWorld2[len(hello):], world) // sugar
fmt.Println(string(helloWorld2))
}