diff options
author | Russ Cox <rsc@golang.org> | 2008-12-18 22:37:22 -0800 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2008-12-18 22:37:22 -0800 |
commit | 89995dcecf37b9a21c26783dcf8ab506da237363 (patch) | |
tree | 851fad01a87b8fa071ed46fa0985f1857d9e47ca /src/lib/utf8.go | |
parent | 924e27f38d133bc7c9978a061b20f950554434ee (diff) | |
download | golang-89995dcecf37b9a21c26783dcf8ab506da237363.tar.gz |
convert *[] to [].
R=r
OCL=21563
CL=21571
Diffstat (limited to 'src/lib/utf8.go')
-rw-r--r-- | src/lib/utf8.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/lib/utf8.go b/src/lib/utf8.go index 7c1c8fbe5..82cb05f54 100644 --- a/src/lib/utf8.go +++ b/src/lib/utf8.go @@ -32,7 +32,7 @@ const ( Rune4Max = 1<<21 - 1; ) -func DecodeRuneInternal(p *[]byte) (rune, size int, short bool) { +func DecodeRuneInternal(p []byte) (rune, size int, short bool) { n := len(p); if n < 1 { return RuneError, 0, true; @@ -181,7 +181,7 @@ func DecodeRuneInStringInternal(s string, i int, n int) (rune, size int, short b return RuneError, 1, false } -export func FullRune(p *[]byte) bool { +export func FullRune(p []byte) bool { rune, size, short := DecodeRuneInternal(p); return !short } @@ -191,7 +191,7 @@ export func FullRuneInString(s string, i int) bool { return !short } -export func DecodeRune(p *[]byte) (rune, size int) { +export func DecodeRune(p []byte) (rune, size int) { var short bool; rune, size, short = DecodeRuneInternal(p); return; @@ -217,7 +217,7 @@ export func RuneLen(rune int) int { return -1; } -export func EncodeRune(rune int, p *[]byte) int { +export func EncodeRune(rune int, p []byte) int { if rune <= Rune1Max { p[0] = byte(rune); return 1; @@ -247,7 +247,7 @@ export func EncodeRune(rune int, p *[]byte) int { return 4; } -export func RuneCount(p *[]byte) int { +export func RuneCount(p []byte) int { i := 0; var n int; for n = 0; i < len(p); n++ { |