Stundenplan und Untis-Namensabgleich verbessern
CI / build-and-test (push) Canceled after 0s

This commit is contained in:
admin committed 2026-09-25 11:54:51 +02:00
1 parent 45b7a2b7e6
commit 960d52686a
8 files changed
+98 -51

No files matched your search

@@ -16,7 +16,8 @@ public static class UntisNameMatching
!string.IsNullOrWhiteSpace(a) && !string.IsNullOrWhiteSpace(b) && NameKey(a) == NameKey(b);
public static string NameKey(string value) => string.Join(' ',
value.Split(' ', StringSplitOptions.RemoveEmptyEntries)
.Select(w => w.Trim().ToLowerInvariant())
System.Text.RegularExpressions.Regex.Split(value, @"[^\p{L}\p{Nd}]+")
.Where(w => w.Length > 0)
.Select(w => w.ToLowerInvariant())
.OrderBy(w => w, StringComparer.Ordinal));
}