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.
Help for those learning Tcl or writing their own scripts.
dokueki
Voice
Posts: 31 Joined: Sat Apr 28, 2007 8:42 am
Location: Bat Yam, Israel
Contact:
Post
by dokueki » Mon Jun 04, 2007 4:48 am
Hey all.
I'd like some help about replacing characters in a string. For example, I want all spaces in a string to become underscores.
Any help for that would be appreciated, thank you!
Sir_Fz
Revered One
Posts: 3794 Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:
Post
by Sir_Fz » Mon Jun 04, 2007 6:30 am
Code: Select all
set string [string map {" " _} $string]
dokueki
Voice
Posts: 31 Joined: Sat Apr 28, 2007 8:42 am
Location: Bat Yam, Israel
Contact:
Post
by dokueki » Mon Jun 04, 2007 6:53 am
Tested, and works spotlessly. Thank you!