mirror of
https://github.com/zjs81/meshcore-open.git
synced 2026-07-25 01:59:04 +10:00
make it that even combination <0x90 is allowed.
This commit is contained in:
@@ -16,12 +16,12 @@ bool matchesContactQuery(Contact contact, String query) {
|
|||||||
|
|
||||||
String? _extractHexPrefix(String query) {
|
String? _extractHexPrefix(String query) {
|
||||||
var cleaned = query;
|
var cleaned = query;
|
||||||
if (cleaned.startsWith('0x')) {
|
|
||||||
cleaned = cleaned.substring(2);
|
|
||||||
}
|
|
||||||
if (cleaned.startsWith('<')) {
|
if (cleaned.startsWith('<')) {
|
||||||
cleaned = cleaned.substring(1).replaceAll(">", "");
|
cleaned = cleaned.substring(1).replaceAll(">", "");
|
||||||
}
|
}
|
||||||
|
if (cleaned.startsWith('0x')) {
|
||||||
|
cleaned = cleaned.substring(2);
|
||||||
|
}
|
||||||
cleaned = cleaned.replaceAll(' ', '');
|
cleaned = cleaned.replaceAll(' ', '');
|
||||||
if (cleaned.length < 2) return null;
|
if (cleaned.length < 2) return null;
|
||||||
if (!RegExp(r'^[0-9a-f]+$').hasMatch(cleaned)) return null;
|
if (!RegExp(r'^[0-9a-f]+$').hasMatch(cleaned)) return null;
|
||||||
|
|||||||
Reference in New Issue
Block a user