text: public virtual string GetLastOnPath(string key){Row now = GetRow(root);int w;string last = null;StrEnum e = new StrEnum(key, forward);for (int i = 0; i < key.Length - 1; i++){char ch = e.Next();w = now.GetCmd(ch);if (w >= 0){last = cmds[w];}w = now.GetRef(ch);if (w >= 0){now = GetRow(w);}else{return last;}}w = now.GetCmd(e.Next());return (w >= 0) ? cmds[w] : last;}