On Wed, Aug 7, 2019 at 3:14 PM <jaco...@gmail.com> wrote:
>
> Sorry, but why is that?

Note that you are replying to a message that is more than seven years old.

That said: why is what?  What are you asking?

Ian


> On Tuesday, June 26, 2012 at 6:27:14 AM UTC-7, Peter S wrote:
>>
>> It follows this simple rule: the length of the result slice is the number of 
>> occurrences of the separator plus one. It is the "right" (intended) 
>> behavior, not a bug; in fact godoc has an equivalent example: 
>> http://golang.org/pkg/strings/#Split
>>
>> Peter
>>
>> On Tue, Jun 26, 2012 at 10:07 PM, Googol Lee <goog...@gmail.com> wrote:
>>>
>>> func main() {
>>>   empty_string := ""
>>>   result := strings.Split(empty_string, " ")
>>>   fmt.Println(len(result)) // here length is 1
>>> }
>>>
>>> If split a empty string, and get a array with one empty string, is that 
>>> right behavior? I think it should return a empty array.
>>
>>
> --
> You received this message because you are subscribed to the Google Groups 
> "golang-nuts" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to golang-nuts+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/golang-nuts/19bfe1af-bf5f-4c54-9198-3d23f9bec14a%40googlegroups.com.

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/CAOyqgcVNO%2BVX3ewS%3DQv2USVxr2HeCCYBmvUrtaB9PFCLE9y3Sg%40mail.gmail.com.

Reply via email to