TinTin++ Mud Client Manual  
Get TinTin++ Mud Client at SourceForge.net. Fast, secure and Free Open Source software downloads
Parse
space
Syntax: #parse {string} {variable} {commands}
space
The parse command works like a simplified loop. Each character in the string will be stored in the given variable and can be used in the commands part.
space
Example: #parse {hello} {character} {say $character!}
This equals: say h!;say e!;say l!;say l!;say o!
space
While generally a useless tintin command, it can be used for some nifty stuff, like using . as a speedwalk command shortcut.
#alias {.%0}
{
        #var cnt {};

        #parse {%0} {char}
        {
                #if {"$char" >= "0" && "$char" <= "9"}
                {
                        #var cnt $cnt$char
                };
                #elseif {"$cnt" == ""}
                {                     
                        #send $char
                };
                #else
                {    
                        #loop $cnt 0 cnt
                        {
                                #send $char
                        }
                }
        }
}

	
space