convert *[] to [].

R=r
OCL=21563
CL=21571
This commit is contained in:
Russ Cox 2008-12-18 22:37:22 -08:00
parent 9786f69f74
commit d47d888ba6
74 changed files with 532 additions and 543 deletions

View file

@ -7,7 +7,7 @@ package strings
import "utf8"
// Split string into array of UTF-8 sequences (still strings)
export func explode(s string) *[]string {
export func explode(s string) []string {
a := new([]string, utf8.RuneCountInString(s, 0, len(s)));
j := 0;
var size, rune int;
@ -50,7 +50,7 @@ export func index(s, sep string) int {
}
// Split string into list of strings at separators
export func split(s, sep string) *[]string {
export func split(s, sep string) []string {
if sep == "" {
return explode(s)
}
@ -72,7 +72,7 @@ export func split(s, sep string) *[]string {
}
// Join list of strings with separators between them.
export func join(a *[]string, sep string) string {
export func join(a []string, sep string) string {
if len(a) == 0 {
return ""
}