CommandRecord.scanUsage Member

Syntax

object.scanUsage();

Returns

Remarks

See Also

Source Code

function cr_scanusage()
{
var spec = this._usage;
var currentName = "";
var inName = false;
var len = spec.length;
var capNext = false;
this._usage = spec;
this.argNames = new Array();
for (var i = 0; i < len; ++i)
{
switch (spec[i])
{
case '[':
this.argNames.push (":");
break;
case '<':
inName = true;
break;
case '-':
capNext = true;
break;
case '>':
inName = false;
this.argNames.push (currentName);
currentName = "";
capNext = false;
break;
default:
if (inName)
currentName += capNext ? spec[i].toUpperCase() : spec[i];
capNext = false;
break;
}
}
}