From 1456296b43462cce0de55049b653c5225e7feac5 Mon Sep 17 00:00:00 2001 From: Timo Teräs Date: Wed, 2 Jun 2021 22:35:58 +0300 Subject: add adbgen applet to generate databases from it's text dump --- src/blob.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/blob.c') diff --git a/src/blob.c b/src/blob.c index aa7ca83..32cd92e 100644 --- a/src/blob.c +++ b/src/blob.c @@ -263,6 +263,12 @@ int apk_blob_sort(apk_blob_t a, apk_blob_t b) return a.len - b.len; } +int apk_blob_starts_with(apk_blob_t a, apk_blob_t b) +{ + if (a.len < b.len) return 0; + return memcmp(a.ptr, b.ptr, b.len) == 0; +} + int apk_blob_ends_with(apk_blob_t a, apk_blob_t b) { if (a.len < b.len) return 0; -- cgit v1.2.3-70-g09d2