Does k1 match k2 as far as k2 goes? */
| 10 | |
| 11 | /* Does k1 match k2 as far as k2 goes? */ |
| 12 | bool datastore_key_startswith(const char **k1, const char **k2) |
| 13 | { |
| 14 | size_t k1len = tal_count(k1), k2len = tal_count(k2); |
| 15 | |
| 16 | if (k2len > k1len) |
| 17 | return false; |
| 18 | |
| 19 | for (size_t i = 0; i < k2len; i++) { |
| 20 | if (!streq(k1[i], k2[i])) |
| 21 | return false; |
| 22 | } |
| 23 | return true; |
| 24 | } |
| 25 | |
| 26 | bool datastore_key_eq(const char **k1, const char **k2) |
| 27 | { |
no outgoing calls
no test coverage detected