mirror of
https://github.com/ceph/ceph
synced 2025-02-24 11:37:37 +00:00
rgw: add str_startswith()
useful util Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
This commit is contained in:
parent
8db289f2e2
commit
422bb6d0ac
@ -1105,6 +1105,11 @@ inline ostream& operator<<(ostream& out, const rgw_obj &o) {
|
||||
return out << o.bucket.name << ":" << o.object;
|
||||
}
|
||||
|
||||
static inline bool str_startswith(const string& str, const string& prefix)
|
||||
{
|
||||
return (str.compare(0, prefix.size(), prefix) == 0);
|
||||
}
|
||||
|
||||
static inline void buf_to_hex(const unsigned char *buf, int len, char *str)
|
||||
{
|
||||
int i;
|
||||
|
Loading…
Reference in New Issue
Block a user