90 const char* data()
const
100 void assign(
const size_t repeat,
const char arg)
102 _bytes.resize(repeat + 1);
103 memset(&_bytes[0], arg, repeat);
107 void assign(
const char *arg,
const size_t arg_size)
109 _bytes.resize(arg_size + 1);
110 memcpy(&_bytes[0], arg, arg_size);
114 void append(
const char *arg,
const size_t arg_size)
116 if (not arg or not arg_size)
119 size_t original_size= size();
122 _bytes.resize(original_size + arg_size + 1);
123 memcpy(&_bytes[original_size], arg, arg_size);
124 _bytes[original_size + arg_size]= 0;
128 assign(arg, arg_size);
132 const char& operator[] (
size_t arg)
const
137 char& operator[] (
size_t arg)
150 return _bytes.size() -1;
154 std::vector<char> _bytes;