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
diff --git a/src/lib/fmt/print.go b/src/lib/fmt/print.go
index 229c264..66174c7 100644
--- a/src/lib/fmt/print.go
+++ b/src/lib/fmt/print.go
@@ -469,7 +469,7 @@
end := len(format) - 1;
fieldnum := 0; // we process one field per non-trivial format
for i := 0; i <= end; {
- c, w := utf8.DecodeRuneInString(format, i);
+ c, w := utf8.DecodeRuneInString(format[i:len(format)]);
if c != '%' || i == end {
p.add(c);
i += w;
@@ -500,7 +500,7 @@
if i < end && format[i] == '.' {
p.fmt.prec, p.fmt.prec_present, i = parsenum(format, i+1, end);
}
- c, w = utf8.DecodeRuneInString(format, i);
+ c, w = utf8.DecodeRuneInString(format[i:len(format)]);
i += w;
// percent is special - absorbs no operand
if c == '%' {