diff options
author | Timo Teräs <timo.teras@iki.fi> | 2021-06-02 22:35:58 +0300 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2021-06-02 22:35:58 +0300 |
commit | 1456296b43462cce0de55049b653c5225e7feac5 (patch) | |
tree | 3099b1f36b0199068e07620a24205c4830f8d567 /src/blob.c | |
parent | 209201bc5d400b68d71af0830efe9085c3648665 (diff) | |
download | apk-tools-1456296b43462cce0de55049b653c5225e7feac5.tar.gz apk-tools-1456296b43462cce0de55049b653c5225e7feac5.tar.bz2 apk-tools-1456296b43462cce0de55049b653c5225e7feac5.tar.xz apk-tools-1456296b43462cce0de55049b653c5225e7feac5.zip |
add adbgen applet to generate databases from it's text dump
Diffstat (limited to 'src/blob.c')
-rw-r--r-- | src/blob.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -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; |