18 lines
391 B
Dart
18 lines
391 B
Dart
bool scLooksLikeBackendUserId(String? value) {
|
|
final text = value?.trim() ?? "";
|
|
if (text.isEmpty) {
|
|
return false;
|
|
}
|
|
return RegExp(r'^\d{15,}$').hasMatch(text);
|
|
}
|
|
|
|
String? scFirstBackendUserId(Iterable<String?> values) {
|
|
for (final value in values) {
|
|
final text = value?.trim() ?? "";
|
|
if (scLooksLikeBackendUserId(text)) {
|
|
return text;
|
|
}
|
|
}
|
|
return null;
|
|
}
|