| 199 | } |
| 200 | |
| 201 | int redis_result::argv_to_string(string& buf, bool clear_auto /* = true */) const |
| 202 | { |
| 203 | if (clear_auto) { |
| 204 | buf.clear(); |
| 205 | } |
| 206 | |
| 207 | if (idx_ == 0) { |
| 208 | return 0; |
| 209 | } |
| 210 | |
| 211 | int length = 0; |
| 212 | for (size_t i = 0; i < idx_; i++) { |
| 213 | buf.append(argv_[i], lens_[i]); |
| 214 | length += (int) lens_[i]; |
| 215 | } |
| 216 | |
| 217 | return length; |
| 218 | } |
| 219 | |
| 220 | int redis_result::argv_to_string(char* buf, size_t size) const |
| 221 | { |
no test coverage detected