Esteemed monks
I am trying to do some more complex etcd tasks and one of them is listing all keys by a prefix. The current API from Net::Etcd only allows for start and end ranges, and they suggest incrementing the range start by one bit to do a prefix search. However, since the keys are typically text strings, this is a bit of a problem.
I found advice suggesting casting strings to unsigned longs and incrementing and then casing back. Unfortunately these are arbitrary length strings and so I have no guarantee that this will be enough space.
Is there some way of incrementing a string by one bit that I haven't seen? Maybe a Perl module or some way of incrementing a base-64-encoded string or something?
In reply to Add 1 to an arbitrary-length binary string by einhverfr
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |