This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

str_replace

Help for those learning Tcl or writing their own scripts.
Post Reply
A
Aimar`
Voice
Posts: 8
Joined: Wed Aug 29, 2007 1:04 pm

str_replace

Post by Aimar` »

Hey, i wrote own script to fetch & display some data and now i got one outgoing variable called $username - it's first and only one arg from tcl which is POSTed in http URL to fetch back result from this query...

Now the problem is... when some1 type !command text[space]next_part

I don't want to split arguments, i just want to replace all white spaces in variable to %20

dunno how to use str_replace for that ;s

Please help me asap
Tnx in advance
Aimar
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

I'd go for "string map"...

Code: Select all

string map {" " "%20"} $username
NML_375
A
Aimar`
Voice
Posts: 8
Joined: Wed Aug 29, 2007 1:04 pm

Post by Aimar` »

thanks, love ya :)
Post Reply