1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

Revert "make function arguments immutable"

This reverts commit 0f0ed8d716.
This commit is contained in:
Alexander Medvednikov
2019-07-05 02:44:22 +02:00
parent 0f0ed8d716
commit d47e2f113f
8 changed files with 33 additions and 42 deletions

View File

@ -642,14 +642,14 @@ pub fn (s string) ustring_tmp() ustring {
}
fn (u ustring) substr(start, end int) string {
_start := u.runes[start]
_end := if end >= u.runes.len {
u.s.len
start = u.runes[start]
if end >= u.runes.len {
end = u.s.len
}
else {
u.runes[end]
end = u.runes[end]
}
return u.s.substr(_start, _end)
return u.s.substr(start, end)
}
fn (u ustring) left(pos int) string {