golang string to array
toArray := strings.Split("you must be pray before learn anything", " ")
fmt.Printf("this is array %v and type data is %v", toArray, reflect.TypeOf(toArray))
golang string to array
toArray := strings.Split("you must be pray before learn anything", " ")
fmt.Printf("this is array %v and type data is %v", toArray, reflect.TypeOf(toArray))
string array to string golang
str1 := []string{"the","cat","in","the","hat"}
fmt.Println(str1)
str2 := strings.Join(str1, " ")
fmt.Println(str2)
str3 := strings.Join(str1, ", ")
fmt.Println(str3)
Output:
[the cat in the hat]
the cat in the hat
the, cat, in, the, hat
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us