public static void Write(string s) { int i = s.IndexOf('['); int j = s.IndexOf(']'); int l = s.IndexOf('}'); if (i == -1 || j == -1 || l == -1) { Console.Write(s); } else { if (i > 0) { Console.Write(s.Substring(0, i)); } Színtvált(s.Substring(i + 1, j - i - 1 )); Console.Write(s.Substring(j + 2, l - j - 2 )); Színtvált("white"); if (l < s.Length - 1) { Színes.Write(s.Substring(l + 1)); } } }
public static string Be(string megj = "") { if (megj != "") { Színes.WriteLine(megj); } Színes.Write("[green]{>> }"); return(Console.ReadLine()); }
public static void Write(string debug, string k) { Színes.Write($"[blue]{{{debug}}}"); Színes.Write(k); }