Added a bunch of utilities and modfief the character data structue

This commit is contained in:
Sebastian Bularca
2026-03-29 18:31:03 +02:00
parent 4a9c00212a
commit ee97b2fec3
110 changed files with 6752 additions and 169 deletions

View File

@@ -0,0 +1,36 @@
using System.Collections;
using System.Text;
namespace Jovian.Utilities {
public static class ArrayUtility {
public static string ListToString(this IList list, bool newLinePerEntry = false) {
if(list == null) {
return "<NULL>";
}
StringBuilder sb = new();
sb.Append("[");
sb.Append(list.Count);
sb.Append("]{");
if(newLinePerEntry) {
sb.AppendLine();
}
for(int i = 0, c = list.Count; i < c; i++) {
sb.Append(list[i]);
if(i < c - 1) {
if(newLinePerEntry) {
sb.AppendLine(",");
}
else {
sb.Append(", ");
}
}
}
if(newLinePerEntry) {
sb.AppendLine();
}
sb.Append("}");
return sb.ToString();
}
}
}