summaryrefslogtreecommitdiff
path: root/test/utf.go
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2009-05-11 14:10:34 -0700
committerRuss Cox <rsc@golang.org>2009-05-11 14:10:34 -0700
commit31d0bd55451bc4b242e5c58886605eee1de8680d (patch)
tree979d1eb0ea7a8087a22d52e9e01b689950238d7f /test/utf.go
parent58a3d4b19017e55d31a1b22ae3d33c6976cedef0 (diff)
downloadgo-31d0bd55451bc4b242e5c58886605eee1de8680d.tar.gz
change utf8.FullRuneInString and utf8.DecodeRuneInString
to use single string argument instead of string, index. R=r DELTA=136 (9 added, 7 deleted, 120 changed) OCL=28642 CL=28644
Diffstat (limited to 'test/utf.go')
-rw-r--r--test/utf.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/utf.go b/test/utf.go
index a93cb69db..59b0ffaa9 100644
--- a/test/utf.go
+++ b/test/utf.go
@@ -23,7 +23,7 @@ func main() {
var l = len(s);
for w, i, j := 0,0,0; i < l; i += w {
var r int;
- r, w = utf8.DecodeRuneInString(s, i);
+ r, w = utf8.DecodeRuneInString(s[i:len(s)]);
if w == 0 { panic("zero width in string") }
if r != chars[j] { panic("wrong value from string") }
j++;