nitlanguage
/
nit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
lib/core: Improve speed of `utf8_length` in NativeString and change signature
[nit.git]
/
lib
/
core
/
text
/
flat.nit
diff --git
a/lib/core/text/flat.nit
b/lib/core/text/flat.nit
index
a72af19
..
9a70db8
100644
(file)
--- a/
lib/core/text/flat.nit
+++ b/
lib/core/text/flat.nit
@@
-458,7
+458,7
@@
class FlatString
self._bytelen = bytelen
_first_byte = from
_bytepos = from
- _length = _items.utf8_length(_first_byte, last_byte)
+ _length = _items.utf8_length(_first_byte, bytelen)
end
# Low-level creation of a new string with all the data.