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.
| 61 | // typically a mistake to pass data() to a routine that expects a NUL |
| 62 | // terminated string. |
| 63 | const char* data() const { return ptr_; } |
| 64 | size_type size() const { return length_; } |
| 65 | size_type length() const { return length_; } |
| 66 | bool empty() const { return length_ == 0; } |
no outgoing calls