replace " " with %
Moderator: Martin
replace " " with %
Why i can not replace an empty string (" ") with another charactor? stringName =replace(stringName, " ", "%"); does not work?!
Re: replace " " with %
I just try this
Put condition debug dialog after it and {a} is %
It can be that your stringName is not really empty. You can try to use encodeURL(stringName) to see if it is really empty.
Code: Select all
stringName = "";
a = replace(stringName, "", "%");
It can be that your stringName is not really empty. You can try to use encodeURL(stringName) to see if it is really empty.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
Re: replace " " with %
I solved it with
replaceAll(someText, "\\s", "%")
replaceAll(someText, "\\s", "%")