data() may return a pointer to a buffer with embedded NULs, and the returned buffer may or may not be null terminated. Therefore it is typically a mistake to pass data() to a routine that expects a NUL terminated string.
| 68 | // typically a mistake to pass data() to a routine that expects a NUL |
| 69 | // terminated string. |
| 70 | const char* data() const { return ptr_; } |
| 71 | stringpiece_ssize_type size() const { return length_; } |
| 72 | stringpiece_ssize_type length() const { return length_; } |
| 73 | bool empty() const { return length_ == 0; } |
no outgoing calls
no test coverage detected