package main
import (
"fmt"
"strings"
)
func main() {
str := "st01,student 1,19"
result := strings.Split(str, ",")
for _, value := range result {
fmt.Println(value)
}
}
Output
st01
student 1
19
package main
import (
"fmt"
"strings"
)
func main() {
str := "st01,student 1,19"
result := strings.Split(str, ",")
for _, value := range result {
fmt.Println(value)
}
}
st01
student 1
19