mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
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:
parent
b948c437a1
commit
d3a412a5ab
48 changed files with 218 additions and 190 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue