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.

cut a variable?

Help for those learning Tcl or writing their own scripts.
Post Reply
N
Nimos
Halfop
Posts: 80
Joined: Sun Apr 20, 2008 9:58 am

cut a variable?

Post by Nimos »

Is there a way to "cut" a variable?

if someone for example uses "!mygreet (text)", then $text should end at for example 15 letters...

is this possible?
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

Code: Select all

string range $text 0 14
User avatar
Papillon
Owner
Posts: 724
Joined: Fri Feb 15, 2002 8:00 pm
Location: *.no

Post by Papillon »

Code: Select all

set text [string range $text 0 14]
Elen sila lúmenn' omentielvo
N
Nimos
Halfop
Posts: 80
Joined: Sun Apr 20, 2008 9:58 am

Post by Nimos »

thanks
Post Reply