| View previous topic :: View next topic |
| Author |
Message |
BadAssWright Voice
Joined: 14 Aug 2005 Posts: 8
|
Posted: Sun Aug 28, 2005 6:25 pm Post subject: Making 1 letter caped |
|
|
I know how to remove all the caps in a line $text or $arg but i dont know how just to make the first letter of a command to be caped
like so
if someone types @commands
the bot will read commands, then responed with
commands @website @help @staff
how can i get Commands to be caped becauses its not set in the tcl file it just reads what ever the user types |
|
| Back to top |
|
 |
De Kus Revered One

Joined: 15 Dec 2002 Posts: 1361 Location: Germany
|
Posted: Sun Aug 28, 2005 7:16 pm Post subject: |
|
|
what about something like that?
set command [string totile $command 1 end]
| Quote: | tcl: evaluate (.tcl): string totitle @commAnd 1 end
Tcl: @Command |
simple and effective
oh, yes... for changing it in the whole string, you might have to use:
| Code: | set text [split $text]
set text [lreplace $text 0 0 [string totitle [lindex $text 0] 1 end]] |
learn more about the magic tcl command string
Edit: fixed typo within [code] _________________ De Kus
StarZ|De_Kus, De_Kus or DeKus on IRC
Copyright © 2005-2009 by De Kus - published under The MIT License
Love hurts, love strengthens... |
|
| Back to top |
|
 |
|