Files
2026-07-13 13:13:17 +08:00

21 lines
518 B
C#

namespace Mediapipe.Tasks.Components.Containers;
internal static class Util
{
public static string Format<T>(T value)
{
return value == null ? "null" : $"{value}";
}
public static string Format(string? value)
{
return value == null ? "null" : $"\"{value}\"";
}
public static string Format<T>(List<T>? list)
{
if (list == null) return "null";
string str = string.Join(", ", list.Select(x => x?.ToString() ?? "null"));
return $"[{str}]";
}
}