egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Remove character

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
Failed
Voice


Joined: 17 Aug 2009
Posts: 1

PostPosted: Mon Aug 17, 2009 9:10 am    Post subject: Remove character Reply with quote

Hi, everyone!

how can i remove the first character of a word?

Cya
Back to top
View user's profile Send private message
tomekk
Master


Joined: 28 Nov 2008
Posts: 255
Location: Oswiecim / Poland

PostPosted: Mon Aug 17, 2009 9:28 am    Post subject: Reply with quote

Code:
set a "word"

puts [string range $a 1 end]


Code:
set a "word"

regsub {[^.]} $a "" a

puts $a


Code:
set a "word"

set a [join [lrange [split $a {}] 1 end] ""]

puts $a


Quote:
[tomekk@zonk]:~# ./zonk.tcl
ord
ord
ord
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber