private static void Execute_Xterm_Command_Block(string str) { XTERM_BLOCK xb = Compile_Xterm_Command_Block(str); foreach (XTERM_COMMAND cmd in xb.Codes) { Execute_Xterm_Command(cmd); } Console.Write(xb.TEXT); }
/// <summary> /// Strips all of the XTERM command sequences from a string and returns the cleaned string. /// </summary> public static string Strip(string format, params object[] args) { string str = format; if (args.Length > 0) { str = String.Format(format, args); } // Get the list of CSI's List <string> CSIS = Tokenize_Control_Sequence_Initiators(str); // Now build an XTERM_COMMAND_BLOCK for each CSI and add it to our list string cleanStr = ""; foreach (string block in CSIS) { XTERM_BLOCK xb = Compile_Xterm_Command_Block(block); cleanStr += xb.TEXT; } return(cleanStr); }