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.

How to evaluate characters in a 1 word

Old posts that have not been replied to for several years.
Locked
g
gerkes

How to evaluate characters in a 1 word

Post by gerkes »

I have words like aa26368

How can i split them character by character then evaluate them as an individual? Also what is the identifier i can use to evaluate how many characters there is in a word?
User avatar
strikelight
Owner
Posts: 708
Joined: Mon Oct 07, 2002 10:39 am
Contact:

Re: How to evaluate characters in a 1 word

Post by strikelight »

gerkes wrote:I have words like aa26368

How can i split them character by character then evaluate them as an individual? Also what is the identifier i can use to evaluate how many characters there is in a word?

Code: Select all

foreach letter [split $word ""] {
  .. do what you want with the letter ($letter) here ..
}
g
gerkes

Post by gerkes »

thanks !
User avatar
arcane
Master
Posts: 280
Joined: Thu Jan 30, 2003 9:18 am
Location: Germany
Contact:

Re: How to evaluate characters in a 1 word

Post by arcane »

gerkes wrote:Also what is the identifier i can use to evaluate how many characters there is in a word?
string length
aVote page back online!
Check out the most popular voting script for eggdrop bots.

Join the metal tavern!
Locked