Replace dont work within JS/QML
QML and Qt Quick
2
Posts
2
Posters
5.0k
Views
1
Watching
-
wrote on 14 Jun 2012, 17:56 last edited by
within my function i have
@ var str = url // URL = http://some.website.com
var n =str.replace("http:///","")@dont work even when i try to use escape char
"http://"
basically i want to take my url variable and remove the http:// from it this works with js web like (jsbin.com) but will not work on QML i get an error
TypeError: Result of expression 'str.replace' [undefined] is not a function.
-
wrote on 18 Jun 2012, 01:36 last edited by
Hi,
You should be able to get this working by changing the first line to:
@var str = url.toString()@
Regards,
Michael
1/2