File tree Expand file tree Collapse file tree 1 file changed +10
-10
lines changed Expand file tree Collapse file tree 1 file changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -420,24 +420,24 @@ func FieldsFunc(s string, f func(rune) bool) []string {
420420 return a
421421}
422422
423- // Join concatenates the elements of a to create a single string. The separator string
424- // sep is placed between elements in the resulting string.
425- func Join (a []string , sep string ) string {
426- switch len (a ) {
423+ // Join concatenates the elements of its first argument to create a single string. The separator
424+ // string sep is placed between elements in the resulting string.
425+ func Join (elems []string , sep string ) string {
426+ switch len (elems ) {
427427 case 0 :
428428 return ""
429429 case 1 :
430- return a [0 ]
430+ return elems [0 ]
431431 }
432- n := len (sep ) * (len (a ) - 1 )
433- for i := 0 ; i < len (a ); i ++ {
434- n += len (a [i ])
432+ n := len (sep ) * (len (elems ) - 1 )
433+ for i := 0 ; i < len (elems ); i ++ {
434+ n += len (elems [i ])
435435 }
436436
437437 var b Builder
438438 b .Grow (n )
439- b .WriteString (a [0 ])
440- for _ , s := range a [1 :] {
439+ b .WriteString (elems [0 ])
440+ for _ , s := range elems [1 :] {
441441 b .WriteString (sep )
442442 b .WriteString (s )
443443 }
You can’t perform that action at this time.
0 commit comments