Moved MewExplorer to a new repo

This commit is contained in:
Felix Weiß
2023-07-10 11:00:34 +02:00
parent 88cdc1a36c
commit d8c18bbf34
58 changed files with 239 additions and 1608 deletions

View File

@@ -3,6 +3,7 @@ using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
namespace MewTerminal;
@@ -24,7 +25,7 @@ internal static class Helpers {
foreach (var prop in props) {
if(isFirst) table.AddColumn(prop.Name);
if(isFirst) table.AddColumn(prop.Name.SplitCamelCase());
var propVal = prop.GetValue(item);
@@ -34,6 +35,10 @@ internal static class Helpers {
strVal = string.Join(" ", bArr.Select(x => x.ToString("X2")));
}
if (propVal is string[] sArr) {
strVal = string.Join(", ", sArr);
}
strVal = strVal.Replace("[", "");
strVal = strVal.Replace("]", "");
@@ -51,4 +56,10 @@ internal static class Helpers {
}
private static string SplitCamelCase (this string str) {
return Regex.Replace(Regex.Replace(str, @"(\P{Ll})(\P{Ll}\p{Ll})", "$1 $2"), @"(\p{Ll})(\P{Ll})", "$1 $2");
}
}