MCPcopy Create free account
hub / github.com/MariaDB/server / string_ref

Class string_ref

plugin/handler_socket/libhsclient/string_ref.hpp:29–41  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27};
28
29struct string_ref {
30 typedef const char value_type;
31 const char *begin() const { return start; }
32 const char *end() const { return start + length; }
33 size_t size() const { return length; }
34 private:
35 const char *start;
36 size_t length;
37 public:
38 string_ref(const char *s = 0, size_t len = 0) : start(s), length(len) { }
39 string_ref(const char *s, const char *f) : start(s), length(f - s) { }
40 string_ref(const string_wref& w) : start(w.begin()), length(w.size()) { }
41};
42
43template <size_t N> inline bool
44operator ==(const string_ref& x, const char (& y)[N]) {

Callers 10

hstcpcli_mainFunction · 0.85
to_string_refFunction · 0.85
op_insertMethod · 0.85
op_readMethod · 0.85
op_readnolockMethod · 0.85
test_2_3Method · 0.85
test_4_5Method · 0.85
test_11Method · 0.85
do_exec_on_indexMethod · 0.85
get_next_rowMethod · 0.85

Calls

no outgoing calls

Tested by 3

test_2_3Method · 0.68
test_4_5Method · 0.68
test_11Method · 0.68