]> Cypherpunks repositories - gostls13.git/commitdiff
To get an empty string, return an empty string, not 0.
authorIan Lance Taylor <iant@golang.org>
Thu, 25 Sep 2008 17:51:23 +0000 (10:51 -0700)
committerIan Lance Taylor <iant@golang.org>
Thu, 25 Sep 2008 17:51:23 +0000 (10:51 -0700)
R=rsc
DELTA=1  (0 added, 0 deleted, 1 changed)
OCL=15858
CL=15860

src/lib/strings.go

index 54aac30c96702d8cb52fc1cfbadccdb304830bb0..a4e81b3544f7d94abc3d95d630598bd3a45dd52d 100644 (file)
@@ -87,7 +87,7 @@ export func split(s, sep string) *[]string {
 // Join list of strings with separators between them.
 export func join(a *[]string, sep string) string {
        if len(a) == 0 {
-               return 0
+               return ""
        }
        if len(a) == 1 {
                return a[0]