I was wondering if anyone has a clue about making a small "caps" proc, This proc would simply convert lowercase text into big text and the other way around aswell.
[caps moo]
<bot> MOO
[caps MOO]
<bot> moo
Thanks if any of you could be bored enough to make it
I think that is what Metroid was asking. How to detect the case not how to change the case
The lifecycle of a noob is complex. Fledgling noobs gestate inside biometric pods. Once a budding noob has matured thru gestation they climb out of their pod, sit down at a PC, ask a bunch of questions that are clearly in the FAQ, The Noob is born
if { ![string is upper $text } {
return [string toupper $text]
} else {
return [string tolower $text]
}
not sure about this one heres what i would try.
The lifecycle of a noob is complex. Fledgling noobs gestate inside biometric pods. Once a budding noob has matured thru gestation they climb out of their pod, sit down at a PC, ask a bunch of questions that are clearly in the FAQ, The Noob is born
i think the only way to do this is split the $text up and change each characters case. loop through foreach $char maybe use a switch statement on it.
The lifecycle of a noob is complex. Fledgling noobs gestate inside biometric pods. Once a budding noob has matured thru gestation they climb out of their pod, sit down at a PC, ask a bunch of questions that are clearly in the FAQ, The Noob is born
proc invertCase str {
string map {a A A a b B B b c C C c d D D d e E E e f F F f g G G g h H H h i I I i j J J j k K K k l L L l m M M m n N N n o O O o p P P p q Q Q q r R R r s S S s t T T t u U U u v V V v w W W w x X X x y Y Y y z Z Z z} $str
}