Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Replace spaces by another thing, in a variable.
#1
Hello !

I'm creating a Website, and, in order to make some repetitives tasks more fun to do, i created some macros.

But, as you may know, in an URL, there can't be any spaces.
So, i would like to know if there is a way, in a variable, to replace " spaces " by this : " - "

So that, when i enter this in the variable : " this is the url "
Quick macro will understand : " this-is-the-url "

This is my variable code atm :

Code:
Copy      Help
str url ;;string variable. If need numeric, replace str to int or double.
int ok1=inp(url "Url name with " - " instead of spaces ?")

Thanks in advance !
#2
Try this to see if it is what you need:

Macro Macro1
Code:
Copy      Help
str url ;;string variable. If need numeric, replace str to int or double.
int ok1=inp(url "Enter Url name with space in it")
url.findreplace(" " "-" 8)
out url
#3
It works ! Thanks a lot ! Big Grin


Forum Jump:


Users browsing this thread: 1 Guest(s)