aboutsummaryrefslogtreecommitdiff
path: root/src/lib/utf8.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/utf8.go')
-rw-r--r--src/lib/utf8.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/lib/utf8.go b/src/lib/utf8.go
index ff55df8021..5ce59894b5 100644
--- a/src/lib/utf8.go
+++ b/src/lib/utf8.go
@@ -273,8 +273,9 @@ func RuneCount(p []byte) int {
}
// RuneCountInString is like RuneCount but its input is a string.
-func RuneCountInString(s string, i int, l int) int {
- ei := i + l;
+func RuneCountInString(s string) int {
+ ei := len(s);
+ i := 0;
n := 0;
for n = 0; i < ei; n++ {
if s[i] < RuneSelf {