aboutsummaryrefslogtreecommitdiff
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
commit3619f1ea6a85b08f8c079b61115c567dd2e51f33 (patch)
tree979d1eb0ea7a8087a22d52e9e01b689950238d7f /test/utf.go
parent5a11a46e2dff0e31d8568fe4680f71175c2e38b5 (diff)
downloadgo-3619f1ea6a85b08f8c079b61115c567dd2e51f33.tar.gz
go-3619f1ea6a85b08f8c079b61115c567dd2e51f33.zip
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 a93cb69dbb..59b0ffaa93 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++;