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

js: draft support for compiling -b js x_test.v

This commit is contained in:
Delyan Angelov
2021-07-27 13:46:48 +03:00
parent 90b9b9d755
commit b0a721b2ec
4 changed files with 179 additions and 1 deletions

View File

@ -323,6 +323,14 @@ pub fn (s string) to_lower() string {
return result
}
// TODO: check if that behaves the same as V's own string.replace(old_sub,new_sub):
pub fn (s string) replace(old_sub string, new_sub string) string {
mut result := ''
#result = new string( s.str.replaceAll(old_sub.str, new_sub.str) )
return result
}
pub fn (s string) to_upper() string {
mut result := ''
#let str = s.str.toUpperCase()