mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
fix #3217 (string.replace)
This commit is contained in:

committed by
Alexander Medvednikov

parent
e20ca28d5c
commit
98b81252b7
@ -152,7 +152,7 @@ pub fn (s string) replace(rep, with string) string {
|
||||
break
|
||||
}
|
||||
idxs << idx
|
||||
idx++
|
||||
idx += rep.len
|
||||
}
|
||||
// Dont change the string if there's nothing to replace
|
||||
if idxs.len == 0 {
|
||||
|
Reference in New Issue
Block a user