SplitAfterN in Go

Posted by GoDoc
Public (Editable by Users)

SplitAfterN slices s into substrings after each instance of sep and returns a slice of those substrings.

Go
Edit
package main

import (
	"fmt"
	"strings"
)

func main() {
	fmt.Printf("%q\n", strings.SplitAfterN("a,b,c", ",", 2))
}