Re: [go-nuts] strings.SplitN(x, 1)

2016-07-04 Thread Matt Harden
Not quite always: https://play.golang.org/p/XEM4afSu57 On Mon, Jul 4, 2016 at 12:37 PM Tom Limoncelli wrote: > Does strings.SplitN(x, 1) always return []string{x}? > > https://play.golang.org/p/3vDg_BFfY9 > > If so, I think the docs would be more clear if this was spelled out. > For example... >

[go-nuts] strings.SplitN(x, 1)

2016-07-04 Thread Tom Limoncelli
Does strings.SplitN(x, 1) always return []string{x}? https://play.golang.org/p/3vDg_BFfY9 If so, I think the docs would be more clear if this was spelled out. For example... *** strings.go-OLD Mon Jul 4 15:33:24 2016 --- strings.go Mon Jul 4 15:34:48 2016 *** *** 266,271 --- 2