first commit

This commit is contained in:
vl.arkhangelskii
2026-09-27 19:12:14 +03:00
commit ba3ba38fc9
318 changed files with 9377 additions and 0 deletions
+10
View File
@@ -0,0 +1,10 @@
final RegExp _signCodePattern = RegExp(r'\d+(?:\.\d+)+');
/// Pulls a GOST/ПДД number out of a model label.
///
/// `3.27`, `3_27` and `sign-3.27` all become `3.27`.
/// Labels without a dotted number return null: the app must not guess a rule.
String? normalizeSignCode(String rawLabel) {
final unified = rawLabel.trim().replaceAll('_', '.').replaceAll('-', '.');
return _signCodePattern.firstMatch(unified)?.group(0);
}