io.StringBytes -> strings.Bytes

io.ByteBuffer -> bytes.Buffer

left io.ByteBuffer stub around for now,
for protocol compiler.

R=r
OCL=30861
CL=30872
This commit is contained in:
Russ Cox 2009-06-29 15:24:23 -07:00
parent b948c437a1
commit d3a412a5ab
48 changed files with 218 additions and 190 deletions

View file

@ -202,3 +202,13 @@ func TrimSpaceASCII(s string) string {
}
return s[start:end];
}
// Bytes returns an array of the bytes in s.
func Bytes(s string) []byte {
b := make([]byte, len(s));
for i := 0; i < len(s); i++ {
b[i] = s[i];
}
return b;
}