mirror of
https://github.com/dz0ny/meshcore-sar.git
synced 2026-10-09 19:55:05 +00:00
chore: Initial commit
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XPovRHpejR4zRxuhjY4Qs3
This commit is contained in:
18
lib/utils/custom_map_id.dart
Normal file
18
lib/utils/custom_map_id.dart
Normal file
@@ -0,0 +1,18 @@
|
||||
const int customMapKey6HexLength = 12;
|
||||
|
||||
String? normalizeCustomMapId(String? mapId) {
|
||||
if (mapId == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
final normalized = mapId.trim().toLowerCase();
|
||||
if (normalized.isEmpty) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (normalized.length <= customMapKey6HexLength) {
|
||||
return normalized;
|
||||
}
|
||||
|
||||
return normalized.substring(0, customMapKey6HexLength);
|
||||
}
|
||||
Reference in New Issue
Block a user