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

js: use prefixed names for functions and global symbols (#11387)

This commit is contained in:
playX
2021-09-08 20:30:46 +03:00
committed by GitHub
parent 96d4a0777f
commit 72089c4feb
25 changed files with 1895 additions and 357 deletions

View File

@@ -718,3 +718,11 @@ pub fn (s string) split_into_lines() []string {
return res
}
// replace_once replaces the first occurence of `rep` with the string passed in `with`.
pub fn (s string) replace_once(rep string, with_ string) string {
s2 := ''
#s2.val = s.str.replace(rep.str,with_.str)
return s2
}