From Valve Developer Community
Jump to: navigation, search

CCommand is a tokenizer used mainly in ConCommands.

It tokenizes a string like "say Valve Developer Community" to a series of arguments (args), in this case being:
Argument 0: say
Argument 1: Valve
Argument 2: Developer
Argument 3: Community


int CCommand::ArgC()
Returns number of arguments.
const char *CCommand::Arg( int nIndex )
Returns the argument nIndex of this CCommand.
const char *CCommand::ArgS()
Returns all args that occur after the 0th arg, in string form
const char *CCommand::GetCommandString()
Returns the original command (the entire command in string form, including the 0th arg)