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.
-
Failed
- Voice
- Posts: 1
- Joined: Mon Aug 17, 2009 9:04 am
Post
by Failed »
Hi, everyone!
how can i remove the first character of a word?
Cya
-
tomekk
- Master
- Posts: 255
- Joined: Fri Nov 28, 2008 11:35 am
- Location: Oswiecim / Poland
-
Contact:
Post
by tomekk »
Code: Select all
set a "word"
puts [string range $a 1 end]
Code: Select all
set a "word"
regsub {[^.]} $a "" a
puts $a
Code: Select all
set a "word"
set a [join [lrange [split $a {}] 1 end] ""]
puts $a
[tomekk@zonk]:~# ./zonk.tcl
ord
ord
ord