mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
all: fix immutable fn args
This commit is contained in:
@@ -694,13 +694,13 @@ pub fn (s string) ustring_tmp() ustring {
|
||||
return res
|
||||
}
|
||||
|
||||
pub fn (u ustring) substr(start, end int) string {
|
||||
start = u.runes[start]
|
||||
if end >= u.runes.len {
|
||||
end = u.s.len
|
||||
pub fn (u ustring) substr(_start, _end int) string {
|
||||
start := u.runes[_start]
|
||||
end := if _end >= u.runes.len {
|
||||
u.s.len
|
||||
}
|
||||
else {
|
||||
end = u.runes[end]
|
||||
u.runes[_end]
|
||||
}
|
||||
return u.s.substr(start, end)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user