> For the complete documentation index, see [llms.txt](https://rafli-ramadhan.gitbook.io/golang-example-code-by-topic/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://rafli-ramadhan.gitbook.io/golang-example-code-by-topic/golang/package/strings/split.md).

# Split

```go
package main

import (
	"fmt"
	"strings"
)

func main() {		
	idStr := "1,2,3,4,5"
	id := strings.Split(idStr, ",")	
	fmt.Println(id)
}
```

```
[1 2 3 4 5]
```
