SafeDispatch/AndroidLIB/SMdebug.cs

60 lines
1.5 KiB
C#
Raw Normal View History

2024-02-22 16:43:59 +00:00
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using System.Timers;
namespace AndroidLIB
{
public class SMd
{
public SMd()
{
}
public static void Debug(string str)
{
string test = "";
foreach (char c in str)
{
if (((c > 31) && (c < 126)) || (c == 10) || (c == 13))
{
test += c;
}
else test += '.';
}
Console.WriteLine(DateTime.Now.ToString("hh:mm:ss") + "--->" + test);
Console.WriteLine("---------------------------------------------------------");
}
public static void Debug(string[] strs)
{
foreach (string str in strs)
Console.WriteLine(str);
Console.WriteLine("---------------------------------------------------------");
}
public static void Debug(string str, bool lines)
{
string test = "";
foreach (char c in str)
{
if (((c > 31) && (c < 126)) || (c == 10) || (c == 13))
{
test += c;
}
else test += '.';
}
Console.WriteLine(DateTime.Now.ToString("hh:mm:ss") + "--->" + test);
if (lines) Console.WriteLine("---------------------------------------------------------");
}
}
}