mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
builtin: consume matched string length in string.replace_each (#6349)
This commit is contained in:

committed by
GitHub

parent
b10d79c4d9
commit
332f3a924c
@ -285,6 +285,11 @@ fn test_replace_each() {
|
||||
'[b]', '<b>',
|
||||
'[/b]', '</b>',
|
||||
]) == '<b>cool</b>'
|
||||
t := 'aaaaaaaa'
|
||||
y := t.replace_each([
|
||||
'aa', 'b'
|
||||
])
|
||||
assert y == 'bbbb'
|
||||
}
|
||||
|
||||
fn test_itoa() {
|
||||
|
Reference in New Issue
Block a user