nitlanguage
/
nit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
combined
(merge:
f9969fb
da2b9e5
)
Merge: lib/core: introduce replace_first in text/string_search
author
Jean Privat
<jean@pryen.org>
Tue, 6 Jun 2017 16:01:39 +0000
(12:01 -0400)
committer
Jean Privat
<jean@pryen.org>
Tue, 6 Jun 2017 16:01:39 +0000
(12:01 -0400)
Replace the first occurrence of `pattern` with `string`
~~~nit
assert "hlelo".replace_first("le", "el") == "hello"
assert "hello".replace_first('l', "") == "helo"
~~~
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Pull-Request: #2475
Trivial merge